LinuxQuestions.org
Help answer threads with 0 replies.
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 01-25-2012, 01:42 PM   #1
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Rep: Reputation: 32
Multi-booting from internal HD and USB HD issue Salix LILO and Fedora Grub


Hi,

I've got a small issue in which I have no idea (although many theories) on how to work it out.....

Basically what concerns me the most is that I'm trying to recover the build of my old now fried laptop which ran Fedora 15 64bit.

I am currently running Salix 64bit on my new system which shouldn't be a problem apart from the fact that it uses LILO as boot manager and I've never worked with it before.

This is what I have:

Internal drive /dev/sda running Salix: boot and root on /dev/sda1

USB hard drive from old laptop: /dev/sdb1 for boot and root

How can I boot the USB HD???

When I run directly from the BIOS I get this error:

dracut Warning no root device "boot:/dev/UUID/UUID=..." found

The crazy thing is that in /etc/fstab I still have the UUID of the device which is exactly the same as the 'real' UUID of the device.

I just wonder if I would need to re-install grub on that disks MBR?


But then what's the best way to do that? - USB boot of Fedora 15 64bit?


Thanks to any advice.....
 
Old 01-25-2012, 05:25 PM   #2
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Ok my solution was to install GRUB2 (version 1.99).

However there are some obsticals I'm facing....

I copied the old /etc/grub.conf file over from my USB Fedora build and edited the disks to match up with the current 'disk-state' which doesn't work

Even using hd(1,0) as the root drive for each Fedora option isn't working.

Currently I don't even have a nice grub menu as for whatever reason - have tried /boot/grub/grub.conf and /etc/grub.conf - it doesn't come up.

Will need to re-run:

Code:
grub-mkconfig
In the mean time I can crudely access my system via:

Code:
linux /boot/vmlinuz root=/dev/sda1
boot

The internal HD works fine and Salix comes up


Now my only issue is how the friggin-heck do I get F15 back booting?

I tried the same command using root=/dev/sdb1 which I get the error of

'no such disk'

?????

The disk is attached and shows as so in the bios! Even booting into the Salix OS instance I can get /dev/sdb1 mounted to whever I wish - usually /sdb


Actually like Ubuntu has grub-update or the otherway round; if there was a command like that, that would be the best but manually it seems I am struggling to boot my USB drive

It's USB 3.0 too in a version 3 port on my notebook so all matches too.....


Ok back to more research and playing around to fix the error.
 
Old 01-25-2012, 06:19 PM   #3
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Here's another little update -

I ran:

Code:
grub-mkconfig > /boot/grub/grub.cfg
grub-setup
This gave me grub with a menu and 2 boot lines for the Salix install; one full boot and one Single user mode

I then added the lines:

Code:
menuentry 'Fedora 15' --class gnu-linux --class gnu --class os {
	load_video
	insmod gzio
	insmod part_msdos
	insmod ext4
	set root='(hd1,msdos1)'
	search --no-floppy --fs-uuid --set=root /dev/sdb1
	echo	'Loading Fedora ...'
	linux	/boot/vmlinuz-2.6.41.4-1.fc15.x86_64 root=/dev/sdb1 ro  
	initrd  /boot/initramfs-2.6.41.4-1.fc15.x86_64.img
}
but the system claims 'no disk' hd(1,0). The kernel needs to be mounted before....

I am quickly going to try to copy the F15 kernel over to Salix /boot dir under a sub-dir called fedora then attempt to piggy-back off that by setting the root to /dev/sdb1 once the kernel has loaded.

I think the issue is due to the disk being a USB drive and either/or-not my bios firmware. (although should be able to handle it as is a Lenovo X220)
 
Old 01-25-2012, 07:22 PM   #4
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Well more reading and investigating led me to find out that Salix doesn't use an initrd to load modules pre-kernel boot.

I created one by:

Code:
mkinitrd -c -k 2.6.37.6 -m jfs:usbcore:sd_mod:ehci_hcd:uhci_hcd:ohci_hcd:usb_storage:scsi_mod -f jfs -r /dev/sda1 -w 15
Then I added:

Code:
initrd  /boot/initrd.gz
To /boot/grub/grub.cfg

I thought I could get away with doing things two ways:

no1: boot the USB drive directly from Grub stored on /dev/sda mbr

no2: boot from Grub stored on USB drive by chainloading from /dev/sda

currently I set this up in custom.cfg:

Code:
menuentry 'Fedora 15' --class gnu-linux --class gnu --class os {
#	load_video
#	insmod gzio
#	insmod part_msdos
#	insmod ext4
#	set root='(hd1,msdos1)'
#	search --no-floppy --fs-uuid --set=root /dev/sdb1
#	echo	'Loading Fedora ...'
#	linux	/boot/fedora/vmlinuz-2.6.41.4-1.fc15.x86_64 root=/dev/sda1 ro  
#	initrd  /boot/fedora/initramfs-2.6.41.4-1.fc15.x86_64.img
#set root='(hd1,msdos1)'
#kernel /boot/usb-boot/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper noprompt cdrom-detect/try-usb=true persistent
#initrd /boot/usb-boot/initrd.lz
#boot
chainloader +1
set root (hd1,msdos1)
}
The system still isn't booting though
 
Old 01-25-2012, 07:57 PM   #5
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
1. You said you installed GRUB 1.99. Was it installed in Salix or the USB drive?

2. What does this command return:
Code:
which os-prober
os-prober is responsible for detecting other Linux OSes on the system. No os-prober, no other Linux OSes in the menu. Not all distros install os-prober as part of the installation, especially if there consider GRUB2 still in development.

3. What is the content of /boot/grub(2)/device.map? It should be similar to:
(hd0) /dev/sda
(hd1) /dev/sdb

4. The USB drive is a USB device, the usb.mod (and possibly the usbms.mod) modules must be loaded first.

5. What filesystem is on the USB drive, ext2,3,4 etc?

5. Try this. From the GRYB menu, drop to GRUB's command line and enter the following commands:

Code:
insmod part_msdos
insmod usb
insmod usbms
insmod ext2
insmod gzio
set root='(hd1,msdos1)'
Now if GRUB recognizes the root of the USB drive, the command:
Code:
ls /boot
will return the contents of /boot.

If it does, then do:
Code:
linux /vmlinuz-2.6.41.4-1.fc15.x86_64 root=/dev/sdb1 ro 1
initrd /initramfs-2.6.41.4-1.fc15.x86_64
boot
Does the kernel boot?

Post back the results.
 
Old 01-25-2012, 08:41 PM   #6
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Thanks for the response

Quote:
1. You said you installed GRUB 1.99. Was it installed in Salix or the USB drive?
Both!

Quote:
2. What does this command return:
Code:

which os-prober

os-prober is responsible for detecting other Linux OSes on the system. No os-prober, no other Linux OSes in the menu. Not all distros install os-prober as part of the installation, especially if there consider GRUB2 still in development.
Wasn't installed so I slapt-get'd it

Took one extra step here: grub-mkconfig > /boot/grub/grub.cfg

Quote:
3. What is the content of /boot/grub(2)/device.map? It should be similar to:
(hd0) /dev/sda
(hd1) /dev/sdb
Code:
(hd0)	/dev/disk/by-id/ata-HITACHI_HTS543232A7A384_E2034233H910PN
(hd1)	/dev/disk/by-id/usb-ST932042_3AS_0000000000006121-0:0
Quote:

4. The USB drive is a USB device, the usb.mod (and possibly the usbms.mod) modules must be loaded first.
Let's see...

Code:
menuentry "GNU/Linux, with Linux 2.6.37.6 (on /dev/sdb1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod ext2
	set root='(hd1,msdos1)'
	search --no-floppy --fs-uuid --set=root 3aad331a-3289-4406-a971-e9eda6768bdd
	linux /boot/vmlinuz-2.6.41.4-1.fc15.x86_64 root=/dev/sdb1 ro
	initrd /boot/initramfs-2.6.41.4-1.fc15.x86_64.img
}
Hmm.... not good! Even fs type is wrong as had ext4 on Fedora (USB drive)

- Will edit and reboot

Back in a bit
 
Old 01-25-2012, 08:51 PM   #7
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Quote:
5. What filesystem is on the USB drive, ext2,3,4 etc?
Ext4

Quote:
5. Try this. From the GRYB menu, drop to GRUB's command line and enter the following commands:
Added:

Code:
menuentry "GNU/Linux, with Linux 2.6.37.6 (on /dev/sdb1)" --class gnu-linux --class gnu --class os {
	insmod part_msdos
	insmod usb
	insmod usbms
	insmod ext4
	insmod gzio
	set root='(hd1,msdos1)'
	search --no-floppy --fs-uuid --set=root 3aad331a-3289-4406-a971-e9eda6768bdd
	linux /boot/vmlinuz-2.6.41.4-1.fc15.x86_64 root=/dev/sdb1 ro
	initrd /boot/initramfs-2.6.41.4-1.fc15.x86_64.img
}
Quote:
Now if GRUB recognizes the root of the USB drive, the command:
You mean once the kernel of Fedora has loaded?

as ls /boot gives me the boot dir within my root filesystem....


The above modules I added rendered this message on Grub:

Quote:
file not found
error no such device
hd1 cannot get C/H/S values
you need to load the kernel first
 
Old 01-25-2012, 09:05 PM   #8
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
OK, please follow the command exactly. Even though you have ext4 filesystem on the USB drive, you must load the ext2 module, there IS NO ext4 module in GRUB. The command 'insmod' tells GRUB to load the specified GRUB module. These are the .mod files in /boot/grub. When you get GRUB's menu, press 'c' to go to the GRUB command line. Your prompt will change to:
Code:
grub>
From there do (EXACTLY):
Code:
insmod part_msdos
insmod usb
insmod usbms
insmod ext2
insmod gzio
set root='(hd1,msdos1)'
You may already have some the modules loaded, but reloading them would not cause any problems. I have included them because I don't know which GRUB modules you have loaded.

Now, if GRUB recognizes,the root of the USB drive, the command:
Code:
ls /boot/
will give you a list of the files in the /boot directory of the USB drive.

Do you see a file listing?

ONLY if you see a file listing will the following commands work:
Code:
linux /vmlinuz-2.6.41.4-1.fc15.x86_64 root=/dev/sdb1 ro 1
initrd /initramfs-2.6.41.4-1.fc15.x86_64
boot
Does the kernel boot?
 
Old 01-25-2012, 09:11 PM   #9
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, puppy, ubuntu
Posts: 2,860

Rep: Reputation: 442Reputation: 442Reputation: 442Reputation: 442Reputation: 442
If you are still able to boot from lilo do the following to add fedora to the lilo boot menu.
1. mount the fedora partition at /mnt
2. edit the /etc/lilo.conf in salix and add the following.

Quote:
# Linux bootable partition config begins
image = /mnt/boot/vmlinuz-2.6.41.4-1.fc15.x86_64
initrd = /mnt/boot/initramfs-2.6.41.4-1.fc15.x86_64.img
root = /dev/sdb1
label = Fedora 15
read-only
# Linux bootable partition config ends
at the prompt run lilo
Quote:
lilo
reboot and cross your fingers

Last edited by colorpurple21859; 01-25-2012 at 09:13 PM.
 
Old 01-25-2012, 09:22 PM   #10
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Quote:
Now, if GRUB recognizes,the root of the USB drive, the command:
Code:

ls /boot/

will give you a list of the files in the /boot directory of the USB drive.

Do you see a file listing?
No listing! - Error: hd1 cannot get C/H/S values


Quote:
If you are still able to boot from lilo do the following to add fedora to the lilo boot menu.
1. mount the fedora partition at /mnt
2. edit the /etc/lilo.conf in salix and add the following.

Quote:
# Linux bootable partition config begins
image = /mnt/boot/vmlinuz-2.6.41.4-1.fc15.x86_64
initrd = /mnt/boot/initramfs-2.6.41.4-1.fc15.x86_64.img
root = /dev/sdb1
label = Fedora 15
read-only
# Linux bootable partition config ends
at the prompt run lilo
Quote:
lilo
reboot and cross your fingers
Tried that in the beginning but lilo came up with an error saying that booting th ekernel was going to be over 31 sectors meaning that it would overwrite the filesystem.

That's why I ended up putting Grub on the system in the first place
 
Old 01-25-2012, 09:27 PM   #11
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
The output of fdisk -l shows this:

Code:
# fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0x4f632b0c

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63    48821534    24410736   83  Linux
/dev/sda2        48821535    53705294     2441880   82  Linux swap
/dev/sda3        53705295   625142447   285718576+  83  Linux

Disk /dev/sdb: 320.1 GB, 320072931840 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142445 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: 0x34f7742e

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048    45058047    22528000   83  Linux
/dev/sdb2        45058048   620546047   287744000   83  Linux
/dev/sdb3       620546048   625141759     2297856   82  Linux swap
If that will help...??
 
Old 01-25-2012, 09:50 PM   #12
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, puppy, ubuntu
Posts: 2,860

Rep: Reputation: 442Reputation: 442Reputation: 442Reputation: 442Reputation: 442
Have you tried coping the fedora kernel and initrd to /boot of salix and use the following lilo.conf entry
# Linux bootable partition config begins
image = /boot/vmlinuz-2.6.41.4-1.fc15.x86_64
initrd = /boot/initramfs-2.6.41.4-1.fc15.x86_64.img
root = /dev/sda1
label = Fedora 15
append = "root=/dev/sb1"
read-only
# Linux bootable partition config ends
 
Old 01-25-2012, 10:00 PM   #13
kayasaman
Member
 
Registered: Sep 2008
Location: Under the bridge where proper engineers walkover
Distribution: Various Linux, Solaris, BSD, Cisco
Posts: 443

Original Poster
Rep: Reputation: 32
Yep tried that too....

Again the problem is that the Fedora Kernel is too large for Lilo. The only answer I got was to patch it from my readings.

I mean what is the C/H/S error anyway? I read about it in the mean time and it seems people running MS based NTFS or similar have those kinds of problems?
 
Old 01-25-2012, 10:01 PM   #14
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, puppy, ubuntu
Posts: 2,860

Rep: Reputation: 442Reputation: 442Reputation: 442Reputation: 442Reputation: 442
Another thought, if you don't have the usb modules built into fedora initrd to access usb drive might be part of the problem

edit: nevermind

Last edited by colorpurple21859; 01-25-2012 at 10:04 PM.
 
Old 01-25-2012, 10:06 PM   #15
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Initially, you loaded GRUB onto the USB drive, did it complete?

I had a similar problem when I accidently installed GRUB to my Windows drive and stopped the installation before it completed. I also the C/H/S error. C/H/S - Cylinder/Head/Sector drive geometry. Reported by fdisk from your previous post. If the drive's geometry cannot be read, you cannot boot from it.

Could you try repairing the MBR? I have no idea how it's done.

Another option you may have is to chroot into Fedora from Salix and re-install GRUB/GRUB2 in Fedora, this should also repair the MBR.

Last edited by towheedm; 01-25-2012 at 10:08 PM.
 
  


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
Internal USB card reader booting Issue (Desktop) 1_Hot_Legend_LS Linux - Newbie 3 06-01-2010 02:21 PM
Booting Fedora 9 from USB using SuSE 10.1 and Grub MainMeat Linux - Newbie 6 04-16-2009 01:46 AM
Booting Fedora 9 from USB using SuSE 10.1 and Grub MainMeat Linux - Newbie 1 04-09-2009 04:48 PM
Booting to Slackware 12, USB, Floppy, Lilo, Grub. lifeforce4 Slackware 11 07-08-2007 09:03 AM
Booting with GRUB/LILO using a floppy form an ISO on a USB device? :s Toxyn Linux - Software 1 02-08-2007 08:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration