Final step to boot from an USB hard disk?

Jim Cornette fc-cornette at insight.rr.com
Fri Mar 25 04:32:23 UTC 2005


Antonio Montagnani wrote:
> Following Simon's instructions ( www.simon.com/usb ):
> Please note that it is an IDE hard disk in an IDE to USB box (and 
> working properly both in Linux and Windows...)

I have a bookdrive that contains an IDE drive. It installs fine with 
FC4T1 without giving options to the installer. I haven't tried to boot 
it yet. I didn't change anything from post install.

To boot from USB flashes, don't you need to do things in a different way?

> 
> 1) I installed Fedora on the external Hard disk, installing grub on 
> /dev/sda and deleting the option to start Windows as my goal is to have 
> a Fedora system booting any laptop!!

Hardware detection from box to box might cause some problems. I change 
videocards in BIOS ocassionally and this causes some problems. I imagine 
adding and removing hardware from machine to machine would reveal some 
pitfalls. The live CDs of different distributions might be more successful.

> 
> 2) according to the instructions I created a new image
> 
> 3) I modified the grub.conf file that now looks like:
> 
> #boot=/dev/sda1
> default=0
> timeout=5
> splashimage (hd1,0)/grub/splash.xpm.gz
> hiddenmenu
> title Fedora Core (2.6.9-1.667)
>  root (hd1,0)
>  kernel /vmlinux-2.6.9-1.667 ro root=LABEL=/ rhgb quiet
>  initrd /usbinitrd.img
> 
> Is it correct??
> 
> 4) I rebooted the machine, but the Rescue disk tells me that there is no 
> Linux partitions!!!!!

I believe you need to add the askmethod using FC3

> 
> 5) Fdisk -p /dev/sda says:
> 
> Disk /dev/sda:81.9 GB, 81964302336 bytes
> 255 hads, 63 sectors/track, 9964 cyclinders
> Units = cylinders of 16065 * 512 0 8225280 bytes
> 
> Device            Boot   Start   End      Blocks         Id         System
> /dev/sda1            *      1          13      104391          83      
> Linux
> /dev/sda2                    14       140      1020127+    82      Linux 
> swap
> /dev/sda3                     141   9964   78911280      83      Linux
> 
> If I manually mount the system by :
> mkdir     /mnt/sysimage
> mount     /dev/sda3     /mnt/sysimage
> mount     /dev/sda1    /mnt/sysimage/boot
> chroot /mnt/sysimage
> 
> 6) At this point if I issue fdisk /dev/sda I get : Impossible to open 
> /dev/sda ??? what does it mean??

Try ls /dev/* and see what devices are listed. I only have /dev/null 
listed in my device directories.

I mounted my installation similar to what you have listed, but am only 
running this installation through a gnome-terminal.

> 
> 7) If I check my fstab file it looks like:
> 
> LABEL=/                                   /        ext3      
> defaults      1   1
> LABEL=/boot1                          /boot   ext3      defaults      1   2
> none                                             /dev/pts   devpts   
> gid=5, mode=620   0   0
> none                                          /dev/shm   tmpfs   
> defaults   0   0
> none                                          /proc   proc   defaults   
> 0   0
> none                                          /sys   sysfs   defaults   
> 0   0
> LABEL=SWAP-sda2               /swap      swap      defaults      0   0
> 
> Why boot1 and not boot????

The LABEL=device needs to differ from the other devices that you have 
available. For my FC3 instalation I have these labels.

cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/                 /                    ext3    defaults        1 1
LABEL=/boot             /boot                ext3    defaults        1 2
none                    /dev/pts             devpts  gid=5,mode=620  0 0
none                    /dev/shm             tmpfs   defaults        0 0
none                    /proc                proc    defaults        0 0
none                    /sys                 sysfs   defaults        0 0
/dev/hda2               swap                 swap    defaults        0 0
/dev/hdc  /media/cdrecorder   auto    pamconsole,exec,noauto,managed 0 0
/dev/sda5 /media/usbdisk      ext3    pamconsole,exec,noauto,managed 0 0
/dev/sda2 /media/usbdisk1     ext3    pamconsole,exec,noauto,managed 0 0
/dev/sda1 /media/usbdisk2     ext3 
pamconsole,exec,noauto,noatime,sync,managed 0 0

For my Experimental USB rawhide install, I have this information in 
/etc/fstab. This information is from the installation running in the 
chroot. I think that these settings would be different if fstab-sync was 
ran. I'll try it. (nope, see error under listing.)

  cat /etc/fstab
LABEL=/1                /                    ext3    defaults        1 1
LABEL=/boot1            /boot                ext3    defaults        1 2
/dev/devpts             /dev/pts             devpts  gid=5,mode=620  0 0
/dev/shm                /dev/shm             tmpfs   defaults        0 0
LABEL=/home             /home                ext3    defaults        1 2
/dev/proc               /proc                proc    defaults        0 0
/dev/sys                /sys                 sysfs   defaults        0 0
/dev/sda3               swap                 swap    defaults        0 0
/dev/hda2               swap                 swap    defaults        0 0

fstab-sync
error: dbus_bus_get: org.freedesktop.DBus.Error.FileNotFound: Failed to 
connect to socket /var/run/dbus/system_bus_socket: No such file or directory

Things seemed the same in fstab.


> 
> 8) at this point I tried to instal grub (grub-install /dev/sda ) but I 
> get the reply :
> /dev/sda: not found or not a block device!!!

This might be due to having no nodes ( /dev/sda and others not being 
present within the chrooted environment.) I don't know how to get device 
nodes loaded because they are not like once was (static and many) Now 
they are dynamic and limited.

> 
> Any help????Thanks


Probably not much help. I am more curious to how one can make this a 
possibility.

Good luck! I'll try some of your suggestions.

Jim
> 


-- 
It may be that your whole purpose in life is simply to serve as a
warning to others.




More information about the fedora-list mailing list