You are not logged in.

#1 2011-10-06 01:03:44

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Portable USB install does not boot [SOLVED]

Hi all,

I've followed the Installing from Existing Linux with Arch's Image instructions a few times with different USB drives with no luck. I always see the following error messages when booting with the USB drive.

:: Running Hook [udev]
:: Triggering uevents...done.
Waiting 10 seconds for device /dev/disk/by-uuid/...
Root device '/dev/disk/by-uuid/...' doesn't exist. Attempt to create it.
ERROR: Unable to determine major/minor number of root device '/dev/disk/by-uuid/...'
You are being dropped to a recovery shell
        Type 'exit' to try and continue booting
sh: can't access tty: job control turned off
[ramsfs /]# 

My HOOKS line in /etc/mkinitcpio.conf looks like

HOOKS="base udev autodetect pata scsi sata usb filesystems usbinput"

Should I just remove the udev hook, or place the usb hook just after base?

Thanks,
mw007

Last edited by mw007 (2011-10-09 00:33:04)

Offline

#2 2011-10-06 14:55:35

Larsson
Member
From: Sweden
Registered: 2010-03-22
Posts: 156

Re: Portable USB install does not boot [SOLVED]

Have you edited the root line in /boot/grub/menu.lst to hd0.0?

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /boot/vmlinuz-linux root=/dev/disk/by-uuid/someuuid ro vga=773
initrd /boot/initramfs-linux.img 

"If the person you are talking to doesn't appear to be listening, be patient. It may simply be that he has a small piece of fluff in his ear." - A.A. Milne (Winnie-the-Pooh)

Offline

#3 2011-10-06 15:19:29

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Re: Portable USB install does not boot [SOLVED]

Ahh, no I haven't done that. I am at work now, and will post back in about 10 hours once I'm home!

Just to make sure, though: the usb hook must be added to /etc/mkinitcpio.conf in order to use a usb-drive as a root device, correct?

Thank you for the quick reply!

Offline

#4 2011-10-07 06:43:32

dabbi2000
Member
From: Reykjavik, Iceland
Registered: 2011-09-28
Posts: 119
Website

Re: Portable USB install does not boot [SOLVED]

You seem to be having exactly the same problem I spent hours debugging... I finally found the error to lie in the missing "usb" from the HOOKS section in mkinitcpio.conf... AND remember to re-create the image after you change the config file (and make appropriate changes in grub menu.lst configuration if you change the name of the image)
https://wiki.archlinux.org/index.php/Mkinitcpio

Also sometimes the menu.lst did once refer to wrong USB drive, using sdc1 when it should have been sdb1, like::

title  Arch Linux
root   (hd0,0)
kernel /vmlinuz-linux root=/dev/sdb1 ro

good luck!

Offline

#5 2011-10-07 19:50:31

Who'sThere?
Member
From: Middle-Of-Nowhere-USA
Registered: 2010-12-09
Posts: 59

Re: Portable USB install does not boot [SOLVED]

mw007 wrote:

Hi all,

:: Running Hook [udev]
:: Triggering uevents...done.
Waiting 10 seconds for device /dev/disk/by-uuid/...
Root device '/dev/disk/by-uuid/...' doesn't exist. Attempt to create it.
ERROR: Unable to determine major/minor number of root device '/dev/disk/by-uuid/...'
You are being dropped to a recovery shell
        Type 'exit' to try and continue booting
sh: can't access tty: job control turned off
[ramsfs /]# 

This is the exact problem I came here to inquire about.

For those who've already installed a non-booting Arch to an USB stick, here's what I did.

In my case, I used the net-install disc. Maybe that's why I never received an usb support prompt...?

- Boot into the install cd-rom, dvd-rom, or usb drive.
- Make a mount directory for your usb installed Arch.
  mkdir /mnt/arch
- Mount the Arch '/' install directory.
  mount /dev/YOUR-DEVICE-PATH-HERE /mnt/arch
- Bind the boot medium's (cd/dvd/usb) filesystem to your Arch usb drive directories.
  mount -o bind /proc /mnt/arch/proc
  mount -o bind /sys /mnt/arch/sys
  mount -o bind /proc /mnt/arch/proc
  mount -o bind /dev /mnt/arch/dev
- Chroot into your usb's install mount point.
  chroot /mnt/arch
- Open the /etc/mkinitcpio.conf file.
  nano /etc/mkinitcpio.conf
- Edit the HOOKS= line to include 'usb' in it, and close after writing changes (ctrl+o)(ctrl+x).
  HOOKS="base udev usb autodetect pata scsi sata filesystems"
- Rebuild the '/boot/initramfs-linux.img' file.
  mkinitcpio -p linux
- Finally, reboot, and test.

Last edited by Who'sThere? (2011-10-07 22:06:12)


Arch Linux: x86_64, Default Kernel.
Repos: Core, Extra, Community, Multilib.

Offline

#6 2011-10-08 18:09:13

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Re: Portable USB install does not boot [SOLVED]

Okay, so here's my update: it is still not working for me. I am going to give all the info necessary in order to perhaps tip someone off to what I'm doing wrong.

Here is what currently happens when I attempt to boot. The computer sees the usb drive and gets to grub. However, once grub gets to the 'kernel' line, I see the following on screen.

  Booting 'Arch Linux'

root    (hd0,0)
 Filesystem type if ext2fs, partition type 0x83
kernel /vmlinuz-linux root=/dev/disk/by-uuid/153b35f4-3fdb-433a-9779-4a55214f7b6d ro

Error 13: Invalid or unsupported executable format

Press any key to continue...

A little bit of info about the computers I am using to make this happen.

My host environment

uname -a : Linux UnyieldingDawn 3.0-ARCH #1 SMP PREEMPT Tue Aug 30 07:32:23 UTC 2011 i686 Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz GenuineIntel GNU/Linux

I followed the step-by-step instructions in: Another Method: Installing from Existing Linux with Arch's Image
I used the archlinux-2011.08.19-core-i686.iso file downloaded from an arch mirror.

Here are the config files created during the process (they are links to pastebin). Note that I've grepped out all comment lines to make them shorter and easier to read.

My target environment

An Asus EEE netbook. It currently has Windows 7 installed, and my mom absolutely hates it.

Just to make sure that the UUID's are correct in the config files, here is the output of the blkid command. The root device is /dev/sdb3.

/dev/sdb1: UUID="f0be01ff-68b3-4811-9112-621f79d31dbf" TYPE="ext2" 
/dev/sdb2: UUID="720bbcdd-76df-4220-9939-f8921c2c1945" TYPE="swap" 
/dev/sdb3: UUID="153b35f4-3fdb-433a-9779-4a55214f7b6d" TYPE="ext4"
/dev/sdb4: UUID="f2f7c8c8-b581-458f-8d74-6a06782aecc7" TYPE="ext4"

The output of fdisk -l:

Disk /dev/sdb: 4009 MB, 4009754624 bytes
124 heads, 62 sectors/track, 1018 cylinders, total 7831552 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc3072e18

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          62      207575      103757   83  Linux
/dev/sdb2          207576      738047      265236   82  Linux swap / Solaris
/dev/sdb3          738048     6065831     2663892   83  Linux
/dev/sdb4         6065832     7826383      880276   83  Linux

That's all I could think of that might be helpful. Please let me know if there's anything else that may help you help me. I'll also be working on this for most of today!

Thanks to everyone that has replied so far! smile

-- mw007

EDIT: if anyone is currently online and has questions about the setup, feel free to contact me at mw007@jabber.org! Thanks again!

Last edited by mw007 (2011-10-08 21:27:40)

Offline

#7 2011-10-08 19:43:52

frostyfrog
Member
From: Utah, USA
Registered: 2011-03-27
Posts: 42

Re: Portable USB install does not boot [SOLVED]

mw007 wrote:

My HOOKS line in /etc/mkinitcpio.conf looks like

HOOKS="base udev autodetect pata scsi sata usb filesystems usbinput"

There's your problem right there! Try placing 'usb' right after udev, then run mkinitcpio -g /boot/kernel32 (I think, but you should obviously do this to the usb drive instead of your main install) wink
I was having the same problem with my portable install until I did that.


{arch32} {subtlewm}{Acer Aspire One AO532h}
{arch64} {Headless Server}
Grrr! 400 char limit sad

Offline

#8 2011-10-08 19:47:42

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Re: Portable USB install does not boot [SOLVED]

frostyfrog wrote:

There's your problem right there! Try placing 'usb' right after udev, then run mkinitcpio -g /boot/kernel32 (I think, but you should obviously do this to the usb drive instead of your main install) wink
I was having the same problem with my portable install until I did that.

Thanks for the reply! However, I have since changed the /etc/mkinitcpio.conf file since my first post. See the updated version: http://pastebin.com/Abx1JkXA

Offline

#9 2011-10-08 21:20:30

mastrgamr
Member
From: New York City
Registered: 2011-08-01
Posts: 19
Website

Re: Portable USB install does not boot [SOLVED]

Here is how I solved the issue, you have to make sure 1000% that your drive has a name. when you format it you have to give it a name so when you run the install from the USB you won't get that error.

--edit, i misread your post. maybe what I said is not the solution...

Last edited by mastrgamr (2011-10-08 21:22:07)


Coming from Ubuntu, New to Arch! -- 8/1/2011
Trying to dual boot Arch Linux with Mac OS X, on MBP -- 4/22/2013

Offline

#10 2011-10-08 21:29:21

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Re: Portable USB install does not boot [SOLVED]

mastrgamr wrote:

--edit, i misread your post. maybe what I said is not the solution...

No worries! A good reply just the same. wink

I've updated post #6 of this thread (couldn't find the link for individual posts?) to include the fdisk output for the drive. Not sure if it helps, but someone may understand it better than I do.

Offline

#11 2011-10-08 22:30:46

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Re: Portable USB install does not boot [SOLVED]

Just figured I'd give an update by letting everyone know what I've tried so far.

I found this post stating that grub needs to be installed into the MBR of the disk again. So, I ran grub-install, then rebooted with the same results. I also tried re-running mkinitcpio, then grub-install, then rebooting -- this also yielded the same error message.

I'm not sure where to go at this point?

Offline

#12 2011-10-09 00:30:54

mw007
Member
From: USA
Registered: 2010-09-23
Posts: 22

Re: Portable USB install does not boot [SOLVED]

Turns out that this was nothing more than a typo. Let me explain...

When initially attempting to make my initrd, I had used the filename vmlinuz-linuz, which was the kernel image name! I had basically overwritten the kernel image with the initrd file. For those that understand the fatal mistake I made here, you can stop reading.

The problem

So, when reading through the mkinitcpio documentation, I found the lsinitcpio command. I ran this on the vmlinuz-linux file in both the host sytem, and on the usb drive.

This is what I saw on the host system:

$ lsinitcpio /boot/vmlinuz-linux
bsdcpio: Unrecognized archive format: Invalid or incomplete multibyte or wide character

This is what I saw on the usb drive:

$ lsinitcpio /mnt/arch/boot/vmlinuz-linux
.
./init
./config
./lib
./lib/libc-2.14.so
./lib/libblkid.so.1
./lib/libuuid.so.1
./lib/ld-2.14.so
./lib/libc.so.6
./lib/libblkid.so.1.1.0

... [output truncated] ...

Odd. On the host environment (the system that works), I cannot read that file. However, I can on the usb drive. The initrd cannot be executed as a kernel, because it's obviously not.

The solution

I renamed the initrd file on the usb drive to what grub expects it to be. I then copied the kernel image from the host environment to the usb drive, since they are the exact same. See below for determining the names of the files.

You have the following grub config file: menu.lst

# (0) Arch Linux
title  Arch Linux
root   (hd0,0)
kernel /vmlinuz26 root=/dev/disk/by-uuid/c587ed73-f4aa-4b8f-8cdd-27e2b620bd84 ro
initrd /kernel26.img

Your kernel image file needs to be named vmlinuz26, and the initrd file needs to be named kernel26.img. On my host system, they are symbolic links, but you should get the point here.

Thanks to everyone who has helped me here. I definitely wouldn't have gotten this far without each of you. smile

-- mw007

Offline

#13 2011-11-09 09:27:18

stifiling
Member
Registered: 2011-11-09
Posts: 5

Re: Portable USB install does not boot [SOLVED]

Who'sThere? wrote:
mw007 wrote:

Hi all,

:: Running Hook [udev]
:: Triggering uevents...done.
Waiting 10 seconds for device /dev/disk/by-uuid/...
Root device '/dev/disk/by-uuid/...' doesn't exist. Attempt to create it.
ERROR: Unable to determine major/minor number of root device '/dev/disk/by-uuid/...'
You are being dropped to a recovery shell
        Type 'exit' to try and continue booting
sh: can't access tty: job control turned off
[ramsfs /]# 

This is the exact problem I came here to inquire about.

For those who've already installed a non-booting Arch to an USB stick, here's what I did.

In my case, I used the net-install disc. Maybe that's why I never received an usb support prompt...?

- Boot into the install cd-rom, dvd-rom, or usb drive.
- Make a mount directory for your usb installed Arch.
  mkdir /mnt/arch
- Mount the Arch '/' install directory.
  mount /dev/YOUR-DEVICE-PATH-HERE /mnt/arch
- Bind the boot medium's (cd/dvd/usb) filesystem to your Arch usb drive directories.
  mount -o bind /proc /mnt/arch/proc
  mount -o bind /sys /mnt/arch/sys
  mount -o bind /proc /mnt/arch/proc
  mount -o bind /dev /mnt/arch/dev
- Chroot into your usb's install mount point.
  chroot /mnt/arch
- Open the /etc/mkinitcpio.conf file.
  nano /etc/mkinitcpio.conf
- Edit the HOOKS= line to include 'usb' in it, and close after writing changes (ctrl+o)(ctrl+x).
  HOOKS="base udev usb autodetect pata scsi sata filesystems"
- Rebuild the '/boot/initramfs-linux.img' file.
  mkinitcpio -p linux
- Finally, reboot, and test.

I had probably about 0% faith this would work for my specific situation. but it did. just created an account, specifically, because i wanted to say thanks.

Offline

Board footer

Powered by FluxBB