Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147186 - LiveUSB method described in the above URL won't work due unnecessary '-t iso9660' mount option
Summary: LiveUSB method described in the above URL won't work due unnecessary '-t iso9...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Release Team
URL: http://www.gentoo.org/doc/en/liveusb.xml
Whiteboard:
Keywords: InVCS
: 145932 147265 158530 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-11 06:18 UTC by Durval Menezes
Modified: 2007-05-10 21:12 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Durval Menezes 2006-09-11 06:18:54 UTC
System: 
Any x86 system, but for the record my test machine is:
- ASUS K8V SE Deluxe
- 521MB DDR ECC RAM on a single module;
- AMD ATHLON 64 3200+

What I tried (and failed):
- Follow the procedure in http://www.gentoo.org/doc/en/liveusb.xml to prepare
  a bootable USB pendrive containing the equivalent of the CD 
  install-x86-minimal-2006.1.iso;

What happened:
- boot aborted when init tried to find the install media, with the following
  error: 
           >> No bootable medium found. Waiting for new devices...
           !! Could not find CD to boot, something else needed!

What the problem is:
- I determined that the problem was in the file /etc/initrd.scripts, in
  the function "findcdmount" to be more precise: it invokes mount with 
  "-t iso9660" option, which is completelly unnecessary on a CD boot 
  (Linux "mount" is completelly capable of determining what file system
  to use by himself), and WILL FAIL IF THE MEDIA IS NOT A CD, like the 
  aforementioned USB pendrive.

How I fixed it:
- opened up "gentoo.igz", modified /etc/initrd.scripts (see diff below),
  generated new gentoo.igz with the modified file: worked perfectly after
  that.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[
--- etc/initrd.scripts.orig     2006-09-11 08:04:01.000000000 -0300
+++ etc/initrd.scripts      2006-09-11 10:08:07.000000000 -0300
@@ -71,7 +71,7 @@
                        if [ -b "${x}" ]
                        then
                                good_msg "Attempting to mount CD:- ${x}"
-                               mount -r -t iso9660 ${x} ${NEW_ROOT}/mnt/cdrom > /dev/null 2>&1
+                               mount -r ${x} ${NEW_ROOT}/mnt/cdrom > /dev/null 2>&1
                                if [ "$?" = '0' ]
                                then
                                        # Check for a LiveCD
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-]

Hope this helps. Also:

- The documentation on the above URL is wrong when it mentions a 
  "dobladecenter" boot option: init doesn't check for anything with
  that name and will silently ignore it. From examination of the /init
  script inside gentoo.igz, I've determined that the correct option is
  "scandelay".

- I've also found a "subdir=" option when examining /init; very useful,
  as it enables one to put all the gentoo files inside a single dir, 
  reducing clutter (and making wrong-deletion errors more difficult for
  unwary users); On the other hand, the test code in the aforementioned
  "findcdmount" function will always look for the "livecd" file on "/",
  which is irritating and pointless. To fix it, here's an additional diff:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[
--- etc/initrd.scripts.orig     2006-09-11 08:04:01.000000000 -0300
+++ etc/initrd.scripts      2006-09-11 10:16:02.000000000 -0300
@@ -75,7 +75,7 @@
                                if [ "$?" = '0' ]
                                then
                                        # Check for a LiveCD
-                                       if [ -e ${NEW_ROOT}/mnt/cdrom/livecd ]
+                                       if [ -e ${NEW_ROOT}/mnt/cdrom/${SUBDIR}/livecd ]
                                        then
                                                REAL_ROOT="${x}"
                                                break
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-]

Hope to have been of help.

Best Regards,
-- 
   Durval Menezes <jm165@tmp.com.br>
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-09-11 11:23:21 UTC
I just ran into this myself, with some hardware that absolutely needed 2006.1 (the 2006.0 kernel doesn't boot on it).

I changed:
-t iso9660 
to:
-t auto

Because mount will not always default to auto, depending on the circumstances.
Comment 2 Chris Gianelloni (RETIRED) gentoo-dev 2006-09-12 05:12:34 UTC
*** Bug 147265 has been marked as a duplicate of this bug. ***
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2006-09-12 06:25:34 UTC
(In reply to comment #0)
> - The documentation on the above URL is wrong when it mentions a 
>   "dobladecenter" boot option: init doesn't check for anything with
>   that name and will silently ignore it. From examination of the /init
>   script inside gentoo.igz, I've determined that the correct option is
>   "scandelay".

Actually, the correct option is "slowusb" rather than scandelay.  Anyway, the documentation isn't maintained by us, and I actually never knew it became an "official" document, as Release Engineering does not support LiveUSB and the developer who did the work on it has left the project.  That being said, I've fixed the initrd.scripts for both the iso9660 and SUBDIR bugs.  These will be fixed in the next genkernel, but a new Gentoo release using it will not be out for quite some time.
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2006-09-12 14:00:20 UTC
*** Bug 145932 has been marked as a duplicate of this bug. ***
Comment 5 Tim Yamin (RETIRED) gentoo-dev 2006-09-16 03:59:19 UTC
Fixed in 3.4.1, thanks!
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2006-12-19 04:20:23 UTC
*** Bug 158530 has been marked as a duplicate of this bug. ***
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2006-12-27 10:01:39 UTC
Actually... this should probably stay open until 2007.0 is released.
Comment 8 Chris Gianelloni (RETIRED) gentoo-dev 2007-05-09 20:27:35 UTC
Well, that was fixed but it appears that there's a different error, which is handled in a different bug (173117).
Comment 9 Chris Gianelloni (RETIRED) gentoo-dev 2007-05-10 21:12:07 UTC
Actually, 143774 is the bug for the exact fix.