Bug 5690 - After install from USB, it should be set as repo (not DVD)
Summary: After install from USB, it should be set as repo (not DVD)
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard: M5 final
Keywords: PATCH
: 1256 14656 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-30 10:16 CEST by Morgan Leijström
Modified: 2015-06-15 23:12 CEST (History)
9 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
Patch that configures urpmi correctly when installing from USB stick (825 bytes, text/plain)
2015-05-17 17:17 CEST, Martin Whitaker
Details

Description Morgan Leijström 2012-04-30 10:16:43 CEST
Description of problem:
When installing using DVD image put on USB stick, the repo get set up automatically so that when user later go into add/remove programs it need DVD.  Naturally it should get set to USB if installed from USB.


How reproducible:
Historically: always, Asking in forum yelded no reply so i guess it still is.
(I have not bandwidth budge to download a DVD just for this, I always use network and urpmi-proxy)



(Related is also the old discusson on mandriva where the installer years ago also asked if media should be copied to hard disk and in future use that as a repo.  I think it was brilliant, except it had a bug in how needed space was calculated for /var and i believe that is the reason it was dropped)
Comment 1 Marja Van Waes 2012-05-26 13:03:44 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 2 Dave Hodgins 2012-05-27 23:54:36 CEST
This bug relates to the installer only, so it should stay as cauldron.

Keywords: NEEDINFO => (none)
CC: (none) => davidwhodgins

Comment 3 Dick Gevers 2014-11-16 22:12:01 CET
Current Cauldron, however, is 5beta1 and not 2 anymore.

@anyone: please advise if this is valid for current installer and please set '5beta1' in the whiteboard field. If found invalid, kindly do close the bug as "resolved --> old"

Thanks!
Comment 4 Ben McMonagle 2015-05-13 11:18:22 CEST
sadly, this is still valid.

applies to: current MGA4  and Mga5, rc and final.

CC: (none) => westel

Ben McMonagle 2015-05-13 11:20:59 CEST

Summary: After install from USB, it should be set as repo (not DVD) => M5final: After install from USB, it should be set as repo (not DVD)

Ben McMonagle 2015-05-13 11:22:39 CEST

Whiteboard: (none) => M5 final
Summary: M5final: After install from USB, it should be set as repo (not DVD) => After install from USB, it should be set as repo (not DVD)

Comment 5 Mauricio Andrés Bustamante Viveros 2015-05-14 07:38:51 CEST
In the USB created using isodumper (classical iso), all the stick is copied as dvd iso9660 except for the EFI thing, the installer mounts as iso9660, this is the reason because we get "please insert the core release dvd", not "core release usb", the installed system does not know what media type was used, not like the online media install, every time we install packages is "mounted" the online media. We need manually mount -t iso9660 /dev/sd? /media to be able to install other packages from the core/nonfree media (from the USB) or get connected and update with mirrorlist. 

I think this is invalid because the USB install media is not automounted as DVD.... (may be a feature request for MGA6: automount the usb with isofs as dvd in the /media mount point) and the newbie gets a plus, because does not need su mount -t ......

CC: (none) => neoser10

Comment 6 Florian Hubold 2015-05-15 12:11:20 CEST
*** Bug 14656 has been marked as a duplicate of this bug. ***

CC: (none) => doktor5000

Comment 7 Florian Hubold 2015-05-15 12:12:25 CEST
FWIW, did anyone here see similar perl issues as reported via bug 5690?

"[...]
Please insert the medium named "Core Release"

Use of uninitialized value in subroutine entry at /usr/lib/perl5/vendor_perl/5.20.1/i386-linux-thread-multi/Net/DBus/Binding/Connection.pm line 257."
Comment 8 Florian Hubold 2015-05-15 12:14:02 CEST
(In reply to Florian Hubold from comment #7)
> FWIW, did anyone here see similar perl issues as reported via bug 5690?

-.- damn night-shift, make that
FWIW, did anyone here see similar perl issues as reported via bug 14656?
Comment 9 Martin Whitaker 2015-05-17 17:17:38 CEST
Created attachment 6567 [details]
Patch that configures urpmi correctly when installing from USB stick

When installing from a USB stick using UEFI boot, the repos are set up as

  Core    Release /mnt/hd/media/core
  Nonfree Release /mnt/hd/media/nonfree

In the latest version of the classic installer DVD, the USB stick gets added to /etc/fstab and will be mounted on /mnt/hd. However, to work, the above URLs need to be changed to

  Core    Release /mnt/hd/x86_64/media/core
  Nonfree Release /mnt/hd/x86_64/media/nonfree

At present this can be done manually after installation. The attached patch is my attempt to fix the installer to do this automatically. It works for me, but would need more extensive testing to make sure it doesn't break anything.

It's possible that with Thomas's latest fix to the ISO format, this will also work with legacy boot, but we need a new version of the classic install DVD to test this.

A note of caution - previously adding the installation USB stick to /etc/fstab was considered a bug (it was what caused beta 3 to fail to boot if you removed the USB stick) and was fixed. It's not causing a problem now because the "nofail" option is added for removable media, but it's possible this is an inadvertent change that will get reverted again.

CC: (none) => mageia

Comment 10 Samuel Verschelde 2015-05-21 10:15:52 CEST
Still valid and has a patch proposed by Martin.

Keywords: (none) => PATCH
Assignee: bugsquad => thierry.vignaud
Severity: enhancement => normal

Comment 11 Samuel Verschelde 2015-05-21 10:17:18 CEST
Raising to blocker given how common USB installs have become, and since it can't be fixed by an update.

Decrease / report to Mageia 6 if too late.

Severity: normal => critical
Priority: Normal => release_blocker

Comment 12 Thierry Vignaud 2015-05-21 10:30:24 CEST
(In reply to Martin Whitaker from comment #9)
Humm, doesn't this break disk & NFS cases?
It would be better to write "(/media)?" instead of "/media" in both changed lines
Comment 13 Martin Whitaker 2015-05-21 19:18:48 CEST
(In reply to Thierry Vignaud from comment #12)
> (In reply to Martin Whitaker from comment #9)
> Humm, doesn't this break disk & NFS cases?

I had wondered about that, hence my remark about it needing more extensive testing. But reading the code, I had half convinced myself that the installer always created the symlink as "/tmp/images/media".

> It would be better to write "(/media)?" instead of "/media" in both changed
> lines

But that should fix it if I'm wrong.

I'll try to find time to test an install from disk.
Comment 14 Nicolas Lécureuil 2015-05-21 21:18:47 CEST
Not release critical

Priority: release_blocker => High
CC: (none) => mageia
Severity: critical => normal

Comment 15 Martin Whitaker 2015-05-22 23:36:36 CEST
I've tested an install using boot-nonfree.iso and installing from local hard disk. Both my original patch and Thierry's suggested change result in the same working urpmi configuration.
Comment 16 Thierry Vignaud 2015-05-25 11:23:29 CEST
Applied to my git tree
Comment 17 Martin Whitaker 2015-05-25 11:34:33 CEST
(In reply to Thierry Vignaud from comment #16)
> Applied to my git tree

Crossed as I was typing this...

My patch is made obsolete by the recent change that allows ISOs copied to a USB stick using dd to be UEFI bootable. This means they are now treated as CDROMs, not disks. However, it may still be useful for installs from local disk.

But the good news is that the same change to the ISOs appears to have fixed this bug. Testing a 64-bit classic install from USB stick (and not setting up online repositories), after install I could select and install further packages using rpmdrake. If the USB stick isn't plugged in at the time, the usual pop-up message appears to prompt you to insert it.

I've tested this with both UEFI and non-UEFI systems.
Comment 18 Thierry Vignaud 2015-05-25 11:51:18 CEST
Can you test a HD install with the patch?
Comment 19 Rémi Verschelde 2015-05-25 12:12:39 CEST
Please also check if this fixes bug 1256.

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=1256

Comment 20 Martin Whitaker 2015-05-25 13:21:52 CEST
(In reply to Thierry Vignaud from comment #18)
> Can you test a HD install with the patch?

I copied the contents of the classic 64-bit DVD to the directory Mageia-5 on a free partition on my hard disk, then used boot-nonfree.iso on a USB stick to install from that location. In all the following tests, the installer created a fstab entry to mount that partition on /mnt/hd.

Without the patch, the installer creates entries in /etc/urpmi/urpmi.cfg like this:

Core\ Release /mnt/hd/media/core {
  key-ids: 80420f66
}

and when running urpmi in the installed system, it can't find the media.

With the patch, the installer creates entries like this:

Core\ Release /mnt/hd/Mageia-5/x86_64/media/core {
  key-ids: 80420f66
}

and urpmi works as it should.
Comment 21 Martin Whitaker 2015-05-25 14:07:03 CEST
(In reply to Rémi Verschelde from comment #19)
> Please also check if this fixes bug 1256.

I can't answer this, because I can't get the installer to install from an ISO file. Entering either the directory containing the file or the full path to the file both result in the message:

  Directory or ISO image file could not be found on partition.

In the former case, the ISO file is shown in the list of files present in that directory.

I guess this needs a new bug report, unless I'm doing something wrong.
Comment 22 Thierry Vignaud 2015-05-25 14:16:33 CEST
(In reply to Martin Whitaker from comment #20)
So I keep your patch in my queue :-)
Thanks
Comment 23 Mageia Robot 2015-05-25 17:09:01 CEST
commit d269fc99ca5de9df10c673c00c5d28063340b848
Author: Martin Whitaker <mageia@...>
Date:   Mon May 25 05:33:37 2015 -0400

    fix urpmi media for USB install (mga#5690)
    
    v2: (tv) handle both cases
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=d269fc99ca5de9df10c673c00c5d28063340b848
Comment 24 Thierry Vignaud 2015-05-25 17:26:46 CEST
Closing

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 25 Thierry Vignaud 2015-05-25 18:42:45 CEST
*** Bug 15857 has been marked as a duplicate of this bug. ***

CC: (none) => marja11

Comment 26 Thierry Vignaud 2015-05-25 18:43:01 CEST
*** Bug 1256 has been marked as a duplicate of this bug. ***

CC: (none) => 0123peter

Comment 27 Martin Whitaker 2015-06-14 21:38:25 CEST
Looks like a typo crept in when you were modifying the patch. In the second changed line you have

  s!/tmp/image(/media).!

which should be

  s!/tmp/image(/media)?!

The '.' causes the directory separator character to get eaten :-(

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 28 Mageia Robot 2015-06-15 21:56:29 CEST
commit b3967b0ac3b0a56dc537744575fbe193a05e7903
Author: Thierry Vignaud <thierry.vignaud@...>
Date:   Mon Jun 15 03:47:43 2015 -0400

    really fix urpmi media when installing from USB
    
    thus fixing mga#5690
    there was a typo in commit d269fc99ca5de9df10c673c00c5d28063340b848
---
 Commit Link:
   http://gitweb.mageia.org/software/drakx/commit/?id=b3967b0ac3b0a56dc537744575fbe193a05e7903
Comment 29 Thomas Backlund 2015-06-15 23:12:12 CEST
rakx-installer-stage2-16.105-1.mga5 pushed with fix added.

will be on mga5 final

Resolution: (none) => FIXED
Status: REOPENED => RESOLVED
CC: (none) => tmb


Note You need to log in before you can comment on or make changes to this bug.