LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-21-2011, 03:04 PM   #1
bsquared
LQ Newbie
 
Registered: May 2011
Posts: 5

Rep: Reputation: 0
Bootable USB Thumb Drive fails with "ERROR: Failed to mount real root device"


Hello,

I am trying to get Arch on a USB thumb drive and have gotten pretty close.

I have managed to get it booting to USB by LABEL, I get dumped out into the rdinit environment with the message:
Code:
ERROR: Failed to mount real root device
Bailing out, you're on your own. Good luck.

/bin/sh: can't access tty; job control turned off
mount: mounting /dev/disk/by-label/USB-SYSTEM on new_root failed: no such device
But If I list /.../by-label the device is there.
Code:
[RAMFS /]# ls  /dev/disk/by-label/
BOOT  HOME  SWAP  SYSTEM USB-BOOT USB-SWAP  USB-SYSTEM
Also while in initrd environment:
Code:
[RAMFS /]# blkid
/dev/sda1: LABEL="BOOT" UUID="d71a5da8-fbdd-4ab9-ba5a-fa2adcda137b" TYPE="ext2" 
/dev/sda2: LABEL="SWAP" UUID="3a437fef-b143-4626-a74c-2332d3a83470" TYPE="swap" 
/dev/sda3: LABEL="SYSTEM" UUID="702e29ad-3f8a-4590-9c97-36a4f0b0262b" TYPE="ext4" 
/dev/sda4: LABEL="HOME" UUID="2ef17520-7602-4855-acee-331535fdb0c7" TYPE="ext4" 
/dev/sdb1: LABEL="USB-BOOT" UUID="3a563c48-850d-410a-afb9-bcd01ed567a5" TYPE="ext2" 
/dev/sdb2: LABEL="USB-SWAP" UUID="980f4f7e-24a2-4347-8595-c61d8f72accf" TYPE="swap" 
/dev/sdb3: LABEL="USB-SYSTEM" UUID="b6d09c53-aed8-494e-b017-df4c3c66b64b" TYPE="ext2"
lists all partitions, that is USB and hard drive, but attempting to manually mount sdbn (USB partitions) failed.
Code:
[RAMFS /]# mount /dev/sdb3 /new_root
mount: mounting /dev/sdb3 on /new_root failed: no such device
I'm not sure what to do to continue. Suggestions are appreciated.

Regards,
Brian
 
Old 07-21-2011, 03:18 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
I have arch installed on a USB-stick and all I did was to install to a single partition and edit the HOOKS in /etc/mkinitcpio.conf to:
Code:
HOOKS="base udev usb autodetect pata scsi sata filesystems usbinput"

/etc/fstab:

Code:
# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0
UUID=7aff43f1-c5ae-4867-b71c-556ff8eb60b4 / ext4 defaults,noatime 0 1
I also installed grub2 to the MBR and ended up with these menuentries:

Code:
menuentry 'Arch Linux, with Linux 3.0.0-rc3' --class archlinux --class gnu-linux --class gnu --class os {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd1,msdos1)'
	search --no-floppy --fs-uuid --set=root 7aff43f1-c5ae-4867-b71c-556ff8eb60b4
	echo	'Loading Linux 3.0.0-rc3 ...'
	linux	/boot/vmlinuz-3.0.0-rc3 root=/dev/disk/by-uuid/7aff43f1-c5ae-4867-b71c-556ff8eb60b4 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/kernel-3.0.0-rc3.img
}
menuentry 'Arch Linux, with Linux vmlinuz26' --class archlinux --class gnu-linux --class gnu --class os {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd1,msdos1)'
	search --no-floppy --fs-uuid --set=root 7aff43f1-c5ae-4867-b71c-556ff8eb60b4
	echo	'Loading Linux vmlinuz26 ...'
	linux	/boot/vmlinuz26 root=/dev/disk/by-uuid/7aff43f1-c5ae-4867-b71c-556ff8eb60b4 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/kernel26.img
}
menuentry 'Arch Linux, with Linux vmlinuz26 Fallback' --class archlinux --class gnu-linux --class gnu --class os {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd1,msdos1)'
	search --no-floppy --fs-uuid --set=root 7aff43f1-c5ae-4867-b71c-556ff8eb60b4
	echo	'Loading Linux vmlinuz26 ...'
	linux	/boot/vmlinuz26 root=/dev/disk/by-uuid/7aff43f1-c5ae-4867-b71c-556ff8eb60b4 ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/boot/kernel26-fallback.img
}
 
Old 07-25-2011, 02:34 PM   #3
bsquared
LQ Newbie
 
Registered: May 2011
Posts: 5

Original Poster
Rep: Reputation: 0
@andrewthomas - thanks for response, Did you install directly to the usb media?

I installed to HD and got my environment setup the way I like and rsync'd to thumb drive. The idea being I can keep my 'SYSTEM' partition synced between thumb drive, laptop and desktop. And use the thumb drive as a rescue disk.

As far as the initrd (mkinitcpio), the setup is mostly like your example, and it works in as much as it boots (grub), finds the ramdisk and the ram disk appears to find the USB device when loading modules. This is where it falls apart.
 
Old 07-25-2011, 02:39 PM   #4
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
you could try to give it some more time.

Add rootdelay=25 to your kernel line in grub

Quote:
Originally Posted by bsquared View Post
Did you install directly to the usb media?
No, I also copied the files from an installed partition.

Last edited by andrewthomas; 07-25-2011 at 02:42 PM. Reason: added reply to quote
 
Old 07-26-2011, 10:08 AM   #5
bsquared
LQ Newbie
 
Registered: May 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by andrewthomas View Post
you could try to give it some more time.
Add rootdelay=25 to your kernel line in grub
Presently I have the following parameters on the kernel line.
panic=30 waitusb=2 rootdelay=10 rootwait

I'll try your suggestion and report the results.
 
Old 07-26-2011, 10:30 AM   #6
bsquared
LQ Newbie
 
Registered: May 2011
Posts: 5

Original Poster
Rep: Reputation: 0
No luck with the rootdelay change. It clearly indicates that the usb device is detected, but reports "no such device" when attempting to mount partition /dev/sda3.
 
Old 07-26-2011, 10:35 AM   #7
entz
Member
 
Registered: Mar 2007
Location: Milky Way , Planet Earth!
Distribution: Opensuse
Posts: 453
Blog Entries: 3

Rep: Reputation: 40
Quote:
Originally Posted by bsquared View Post
Presently I have the following parameters on the kernel line.
panic=30 waitusb=2 rootdelay=10 rootwait

I'll try your suggestion and report the results.
well rootdelay definitely worked for my usb boot
strangely however you didn't get a kernel panic (which usually what happens when the kernel can't mount the root fs)
it's probably because in your case you've a ramdisk ...
 
Old 08-08-2011, 11:16 AM   #8
bsquared
LQ Newbie
 
Registered: May 2011
Posts: 5

Original Poster
Rep: Reputation: 0
I rebuilt the kernel26.img file with mkinitcpio and noticed that the resulting is smaller than the original. Could this be the problem?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"LILO - Timestamp mismatch" with bootable USB flash drive Skaperen Slackware 7 07-14-2011 09:13 AM
[SOLVED] SuSE fails to boot from qLogic Fibre channel card - "No root device found" nonshatter Suse/Novell 4 11-01-2010 07:38 AM
Running kernel.org "mainline" Linux on Xen: FAILED to find root device bojanap Linux - Kernel 1 09-17-2010 11:42 PM
Hard drive in USB enclosure gets "device descriptor read/64, error -71" oot Linux - Hardware 1 10-19-2009 03:14 AM
root can mount usb thumb drive but nobody else. why? km4hr Linux - Newbie 3 03-26-2009 12:02 PM


All times are GMT -5. The time now is 08:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration