Jump to content
Compatible Support Forums
Sign in to follow this  
beto

Trying to install FC5 on an USB HD to dual boot from a laptop with WinXP

Recommended Posts

Hello everybody

I am trying to get this working but can not. I have a laptop with Windows Xp and installed FC5 on a USB HD to dual boot, when it restarted nothing happened it whent straight to windows,so tried to install it again but now all I get is "GRUB Hard Disk Error" can not use Windows nor FC5. My computer does not have a BIOS option to boot from USB.

 

Hard Drives

/dev/sda

/dev/sda1 ntfs 95394 1 12161

/dev/sdb

/dev/sdb1 ext3 /boot1 102 1 13

/dev/sdb2 ext3 /1 10001 14 1288

/dev/sdb3 swap 4997 1289 1925

 

 

 

this is what I get from fdisk -l

Disk /dev/sda: 100.0 GB

Device Boot Start End Blocks Id System

/dev/sda1 * 1 12161 97683201 7 HPFS/NTFS

 

Disk /dev/sdb: 80.0 GB

/dev/sdb1 * 1 13 104391 83 Linux

/dev/sdb2 14 1288 10241437+ 83 Linux

/dev/sdb3 1289 1995 5116702+ 82 Linux swap /

 

 

Does anyone knows how to fix it?

Thanx in advance for your time.

Share this post


Link to post

The GRUB Hard Disk Error is a reesult of grub not being able to raed the disk geometry of the drive. My guess is that you installed again and installed Grub to the MBR of the hda drive.

 

On the first installation, you accepted the default installation partitioning on the USB drive, right?

 

What make and model laptop is this? Some laptops have problems with disk geometry, especially with USB drives. The Fedora release notes make note of this (which no one usually reads until after the fact) for Sony Vaio laptops.

 

Also, did you pre-format the USB drive before the Fedora installation, or allow Fedora to format the drive for you?

 

The ideal situation, in your case, would have been to install fedora on the same hard drive in the laptop, especially since your bios does not support booting from a USB drive.

 

Was Windows pre-installed on the laptop and/or do you have a full Windows CD installation disk?

Share this post


Link to post

 

The laptop is a Toshiba Satellite M45-S2693, yes with Windows XP Home Edition pre installed, the USB Drive had a NTFS partition, but I remember selecting the partition, deleting it (so I guess Fedora formated it right?) and setting a root and a boot partitions only, and I remember I got a warning saying that it was recommended to make a swap partition, but I countinued (this was the first installation). On the second installation I added the swap partition and then I got the error.

So there is no way to install Fedora on an external USB drive in this case?

 

 

 

Share this post


Link to post

Now I remember the issue. In previous versions of Fedora, ther modules (drivers) to load an external hard drive are not available in the kernel initrd file at boot. Fixing the problem involved booting in rescue mode and making a new initrd file to use at boot time.

 

So fixing the issue involves knowing a bit about Linux and following some specific directions to get it to work. I will have to look at ther installation cd to see if there is a boot image for this. My guess is that unless someone knows if this issue is fixed in Fedora Core 5, you would have to wait for a solution to be posted by someone who has actually done it.

 

So, my question still stands. Do you have a full Windows installation CD to recover the MBR od the internel drive?

 

Also, how much experience do you have with Linux?

 

Understand, that Fedora has been designed to be installed on an internel hard drive. I would imagine that Windows would pose the same issue, since you don't have an option in the bios to boot from USB. I'm a little surprised at this, given the newness of your laptop.

Share this post


Link to post

Thanks danleff, I apreciate your time and knowledge. I do not have a full WinXP copy, all I did get with the laptop was the cd that recovers the original installation (Windows XP Home Edition and a bunch of software I do not use), I did not try using it, what I did (I had Win98 boot CD) used it and did an fdisk/mbr, and WindowsXP is working again.

I do not have much experience with Linux, I just know basic commands, I always have used it in the office for basic stuff, actually this is the third time I install it for personal use (on my own equipment). But this is the first time I try to install it on an external disk, the previous times, I installed it on the internal drive of another computer with no problems.

 

Well I will keep trying and doing a little research.

 

Thank you again

Share this post


Link to post

Nice idea, but you still have to have the ability to boot off a USB drive in the bios, which beto does not have. He noted in his first post on the thread;

 

Quote:
My computer does not have a BIOS option to boot from USB.
.

Share this post


Link to post

I have both Fedora Core 4&5 installed on USB hard drives.

Both run great. I used the following two references to make

my installation :

 

http://www.vigla.eclipse.co.uk/usb_install.pdf

 

and

 

http://simonf.com/usb

 

With FC 5 I received several error messages but when the new initrd was written but it works great.

 

In general the problem is to preload the required USB drivers so that the drive can boot.

 

Command is in breif:

 

mkinitrd --preload <modules> -o /boot/initrd.img

 

For details follow the reference documents.

 

Note the the mkinitrd command file for FC 5 specifies that the command be preload <module> while for FC 4 it is preload=<module> . Also the man mkinitrd file in FC 5 indicated that the proper syntax is preload=<module> .

 

Having fun with linux from a USB drive.

 

Jim

 

Share this post


Link to post

I was nearly successful in running FC 5 on my USB hard drive. I followed the instructions from this posting and other sources; however I encountered the following error message during FC boot process, shortly after passing the GRUB menu and what appeared to be the FC initialising:

 

fsck.ext3: Bad magic number in super-block while trying to open /dev/sdb1 [failed]

 

After reading the error message, I entered maintenance mode, then used fdisk to get disk partition information. fdisk showed the following device assignments:

/dev/sdb (laptop hard drive)

/dev/sdb1 fat

/dev/sdb2 ntfs

 

/dev/sda (installed FC 5 on this USB drive)

/dev/sda1 ext3 /boot

/dev/sda2 ext3 LVM

/dev/sda3 vfat

 

During FC 5 installation, anaconda (installer) read my hard drives as:

 

/dev/sda (laptop hard drive)

/dev/sda1 fat

/dev/sda2 ntfs

 

/dev/sdb (installed FC 5 on this USB drive)

/dev/sdb1 ext3 /boot

/dev/sdb2 ext3 LVM

/dev/sdb3 vfat

 

Could the error result from the change of device assignments for USB drive before and after FC installation? It appears that FC's intialisation is not checking boot partition in USB drive, ie /dev/sda1 (ext3, /boot).

Share this post


Link to post
Quote:
Could the error result from the change of device assignments for USB drive before and after FC installation? It appears that FC's intialisation is not checking boot partition in USB drive, ie /dev/sda1 (ext3, /boot).


Boy, I really have to try this. To answer your question, yes. When you change the driive designation in the bios, you change the physical designations of the drives in the system. So, you need to alter Grub and where it looks for the correct partition.

If you got into rescue mode and the root of the installation with chroot /mnt/sysimage, then you probably need to change the root designation for the Fedora partition to match how the drive is seen now (booting from USB in the bios).

Maybe james419 can comment on this (since he has done it), but try changing in the /boot/grub/menu.lst file,

title Fedora....
boot (hd1,1)

to

title Fedora
boot (hd0,1)

You may also have to change another value, but let's see if this works first.

Share this post


Link to post

My USB drives are self powered to insure that my bios can see them first instead of waiting for them to "wakeup". I tried several USB housings that were bus powered and found that they did not boot the same all the time (some times as hd0 and some times as either hd1 or hd2- I have 3 drives in my system). Using a self powered drive and having it on before boot allows it to normally boot as hd0. I always check the device.map file and correct it to the following in my installs.

 

hd0 sda <--USB drive

hd1 hda <--main drive with Windows XP and some Dell Partitions

hd2 hdb <--data drive with "My Documents" and a FAT32 Partition

for data exchange with linux

 

My computer is set to boot order= floppy, cd/dvd rom, USB drive and then IDE(drive C:)

 

I also edit the grub file to insure that my linux distros ars booted to hd0,x . Where the x is the partition the distro boots from. Also my grub(or lilo) is installed on the mbr of the external drive. That way if the removable drive is noy on or connected the computer will just boot to my Windows install.

 

In some cases it will be necessary to do a remapping of the Windows boot info in order to be able to boot the main drive.

If you have a problem I will post that portion of my grub.conf(menu.lst) file.

 

I have not used logical volumns because of all the posts I have seen about people having trouble booting after their installs on USB drives.

I am just to much of a newbe to get into that thicket now.

 

Jim

[Edited by james419 on 2006-05-29 23:58:56]

 

[Edited by james419 on 2006-05-30 00:01:24]

 

Share this post


Link to post

Thanks Jim for your input. I use a bus powered USB drive, and when I'm booting FC 5 from USB drive, /dev/sda (hd0) is always assigned to USB drive. I noticed that you don't have /dev/sdb only /dev/hda and /dev/hdb in your system.

 

danleff, I don't understand where you place the boot (hd0,0) line because anaconda (FC installer) commented this line out (see my grub.conf. I observed that any changes to grub.conf are also stored in menu.lst. I have only made changes to grub.conf. Did you try the FC installation with only 'sda' devices?

 

My grub.conf is as follows:

 

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You have a /boot partition. This means that

# all kernel and initrd paths are relative to /boot/, eg.

# root (hd0,0)

# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00

# initrd /initrd-version.img

#boot=/dev/sdb

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title Fedora Core (2.6.15-1.2054_FC5)

root (hd0,0)

kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet

initrd /usb-2.6.15-1.2054_FC5.img

title Windows XP Pro

map (hd0) (hd1)

map (hd1) (hd0)

rootnoverify (hd1,1)

chainloader +1

 

Jim, I believe that the re-mapping of the Windows boot info is shown under my Windows XP Pro title. Anaconda installed Logical Volumes by default. I have same grub setup as you (installed in MBR). I don't believe that the Logical Volumes caused the error that I reported.

 

I know that FC 5 is initialising from my USB drive (/dev/sda) because I receive the following initialisation messages:

Setting Clock [OK]

Starting udev [OK]

Starting up Logical Vol Management [OK]

Checking filesystems:

fsck.ext3: Bad magic number in super-block while trying to open /dev/sdb1 [failed]

 

I can see that it is very obvious that FC 5 should be checking /boot partition at /dev/sda1, instead of /dev/sdb1 (refer to my previous posting for device assignments when booting from USB drive)

 

I still had same error message after editing device.map (in Linux rescue mode) with:

(hd1) /dev/sdb

(hd0) /dev/sda

where USB drive is sda and my laptop hard drive as sdb, then rebooting.

 

I have searched the web but found no specifics on FC installation with 2 drives assigned /dev/sda and /dev/sdb (and one drive is USB).

 

I would like to edit anaconda-ks.cfg, where there is a line

bootloader .... --driveorder=sdb,sda. I don't know how to make this file editable in maintenance mode (after boot failure), and change the line to --driveorder=sda,sdb - in the hope that FC may check the /boot partition in correct partition of USB drive.

Share this post


Link to post

Sorry, I used some shorthand when I specified my drive map as

 

hd0 sda etc it should have been /dev/sda etc.

 

In general your boot drive should be hd0 and all other drives listed after that in your device.map file (in the grub folder).

 

(hd0) /dev/sdx <-- linux boot drive

(hd1) /dev/sdx <-- next detected drive

(hd2) /dev/sdx <-- etc

 

Sometimes anaconda will assign hdx order relative to that which existed when the installation was made- that is the norman boot order with the external drive being last. When listing in the grub.conf and device.map files this should be changed. Your grub.conf file looks ok. It lists your bootas

 

root (hd0)

 

as it should as long as FC5 is on the boot drive.

 

Since I do not have SCSI drives my experience is none existant there- I am not sure how to map them. Also I am not sure what

the bad magic number error indicates. That is possibly the answer to your boot problem. A google search about the bad magic number may find something.

 

The remap of the Windows partition looks as it should. Question-

Does Windows boot from grub?

 

Sorry I can not be of more help now.

 

Jim

 

 

 

 

[Edited by james419 on 2006-05-30 23:05:04]

 

Share this post


Link to post

That was my thought as well. Does Windows boot OK and do you get the graphical Fedora Grub boot screen?

 

These are not scsi drives, correct? your main drive in the system is sata and the USC is also seen the same, as a scsi drive. All sata drives and USB drives are seen as sda,sdb...and so on. This is normal. It does not matter if you have ide drives in the system or not.

 

Remember, when you change the bios boot order, all things change. Are you trying to boot the system without changing the bios boot order?

 

Your Grub.conf file looks wrong, as well. Let me look closely at this. The file acts as if it is wanting to booting USB first, which is why I asked about changing the boot order in the bios at any point during the process of installing Fedora, or after it was installed.

 

The bad magic number error is related to the root= line and Grub file pointing to the Windows partition.

 

The catch here is the LVM partition on your system. The root= also does not look correct. The problem is that I don't know about LVM designations, as I do not use them (the exact correct order).

 

Quote:
I still had same error message after editing device.map (in Linux rescue mode) with:

(hd1) /dev/sdb

(hd0) /dev/sda

where USB drive is sda and my laptop hard drive as sdb, then rebooting.

 

Why did you change the designations of the /boot/grub/device.map file?

 

If you are booting from your hard drive on the system, sda should be that drive and sdb the USB drive. However, it looks like you are booting directly off the USB drive with Grub on the USB drive, correct?

 

Any possibility of posting the /etc/fstab file, especially as it relates to the LVM root drive? Does it look like (exactly);

 

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1

LABEL=/boot /boot ext3 defaults 1 2

 

I hope that I am not confusing the point here.

Share this post


Link to post

In reply to James' questions, Grub (installed in the MBR of the USB drive) does boot Windows (2nd boot option after Fedora Core 5).

 

"Sometimes anaconda will assign hdx order relative to that which existed when the installation was made- that is the norman boot order with the external drive being last."

 

I agree with above comment. At time of FC installation, my BIOS boot order was:

1) CD/DVD/CD-RW

2) USB Storage Drive

3) Internal HDD

And, ananconda generated the following device.map:

(hd1) /dev/sda <-- internal drive

(hd0) /dev/sdb <-- USB drive

If you refer to my earlier postings, I mentioned that at time of booting up my USB drive (after installation completion), my devices were assigned differently:

/dev/sda <-- USB drive

/dev/sdb <-- internal drive

Hence, I edited the device.map to reflect the above device assignments.

 

Windows boot OK. If I boot from the USB drive, with the above BIOS boot order, I get the graphical Fedora Grub boot screen and I can boot Windows from Grub boot screen.

 

What is USC? I believe so - my main drive is SATA. Both main drive and USB drive are Fujitsu 2.5" drives.

 

BIOS boot order was not changed during and after installation.

 

You are correct - I'm booting directly off the USB drive with Grub in USB drive's MBR.

 

BTW (in another trial) I installed Grub in the boot partition (/boot) of FC5 (in the USB drive) and configured Windows bootloader to point to this partition (to load FC5); but I still received the bad magic error number.

 

Despite having USB Storage Drive before Internal HDD in the BIOS boot order at time of installing FC5, I still get following device assignments:

/dev/sda <-- internal drive

/dev/sdb <-- USB drive

 

My fstab file contains the following:

 

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1

LABEL=/boot /boot ext3 defaults 1 2

devpts /dev/pts devpts gid=5,mode=620 0 0

tmpfs /dev/shm tmpfs defaults 0 0

proc /proc proc defaults 0 0

sysfs /sys sysfs defaults 0 0

/dev/VolGroup00/LogVol01 swap swap defaults 0 0

 

(danleff) The first two lines are the same as yours.

 

Should I proceed with troubleshooting the FC5 installation on USB drive, or install FC5 in my internal drive? I'm out of ideas.

 

Thanks very much for your assistance.

 

Share this post


Link to post

danleff and theng

 

I have zero knowledge of logical volumes so my comment my be way off base. Looking back at theng's earlier post his USB drive is partitioned as 3 partitions, 1 is /boot 2 is LVM and 3 is vfat.

 

In his grub.conf the following lines appear:

 

kernel /vmlinuz- etc

initrd /usb- etc

 

In a none logical volume grub.conf used on USB drives those lines would be:

 

kernel /boot/vmlinuz- etc

initrd /boot/usb- etc

 

Is it possible that the folder or partition should be placed in his grub.conf file?

 

theng

 

I have had no problem with getting various linux distros to run on external USB drives but since I am new to linux I have avoided the more complex items such as logical volumes and declined to accept LVM during the installation. FC 3,4 & 5 all have a point where they ask if you want to use LVM- I always indicate no. At present I have FC4 & 5, SUSE 10.0, PCLOS, Mepis,

Mandriva 2006 and Kanotix on USB drives. None were really hard to get up and running but would have been easier on my internal drives.

Share this post


Link to post

I can offer a partial explanation of the issue. Again, the LVM issue is what hangs me up and it's proper usage.

 

splashimage=(hd0,0)/grub/splash.xpm.gz

 

Points to the /boot partition, which holds the necessary files for the splash screen and grub stage files.

 

title Fedora Core (2.6.15-1.2054_FC5)

root (hd0,0)

kernel /vmlinuz-2.6.15-1.2054_FC5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet

initrd /usb-2.6.15-1.2054_FC5.img

 

The kernel and initrd files are also on the /boot drive, or the first partition on the Fedora installation drive. So, this is correct.

 

The root=/dev/VolGroup00/LogVol00 allows the root of Fedora, on the LVM to be initiated. This is probably where the problem exists. I have yet to find a good description of the logical progression of these partitions anywhere and if it is amiss in this case.

 

I just tried a USB install with FC5 on my system (linux expert). The process fails with trying to create the special usb version or initrd as chroot. I also get a grub> hang on boot off the USB disk.

 

Running Linux rescue causes the modeules to load, but FC5 fails to load everything into /mnt/sysimage.

 

Mounting chroot /mnt/sysimage, of course, results in the kernel and initrd being absent, as they are in the /boot partition. I tried some workarounds for this that I found, but FC5 seems to have some changes that make the directions that I found obsolete.

 

mkinitrd is not able to be executed.

 

Of course, I tried to do the install using (defaulting to) LVM, allowing Fedora to format the USB drive for me. I did this intentially, to see what effect LVM would have on the process.

 

I would agree. It seems that setting up the install with the traditional partitioning setup (do not allow LVM) seems to be the way to go.

 

I'll keep it up and report back. This is one of those challenging tasks that I like to try. You learn so much from it!

 

 

 

Share this post


Link to post

Thanks very much danleff, and for your perserverence. You are correct, FC5 fails to load everything into /mnt/sysimage. I mounted my FC boot partition (/dev/sdb1) into /mnt/sysimage/boot. I could subsequently run mkinitrd to create the usb-2.6.15-1.2054_FC5.img in ../boot and edit the grub.conf in ../boot/grub.

 

You reckon that initiation of LVM is the cause of the problem on a USB drive?

 

Should I try the partition for RAID when installing Fedora on USB drive?

 

I agree one does learn much.

Share this post


Link to post

Yes I do. Things have also changed with the Linux rescue so that the old fixes seem out-of-date. I'm sure that someone will find a workaround. If you do the install telling FC to partition the USB drive w/o LVM, with the traditional linux partitions. It will most likely be easier to get the process to work correctly. At least james419 and I know how to manipulate grub to work much easier.

 

And doing this has given me some additional insight into some probable bugs in the FC 5 installer that others have experienced.

Share this post


Link to post

In reading the complete /sbin/mkinitrd file I find an option

'--force-lvm-probe'. Perhaps if you added this to the mkinitrd command combination it would work. ie:

 

mkinitrd --preload usb-storage --preload ehci-hcd --preload scsi_mod --preload sd_mod --force-lvm-probe /initrid-etc

 

Note that with the newer mkinitrd commands the syntax has slightly changed- it no longer is '--preload=<module>' but is now '--preload <module>'

 

By the way I am now using the 1.2080 version of the kernel.

There is also a version 2.6.16-1.2122_FC5 which I cound get to boot to USB so I just deleted it. I found that in FC_4 that several kernel option would never run on USB also.

Share this post


Link to post

Thanks. I performed the installation, "telling FC to partition the USB drive w/o LVM, with the traditional linux partitions." Initially, I thought it was just ticking the box that specified 'Hide RAID device/ LVM Vol Group members'; however the same 'magic number' still appeared at FC initialisation then I realised that LVM was still created. Hence, I chose Anaconda's custom layout option for disk partitioning.

 

I could not find an option where Anaconda would install the traditional Linux partitions without LVM; hence I had to make my own partitions. By traditional Linux partitioning do you mean the following configuration?

 

Start End System

/dev/sdb1 1 13 Linux

/dev/sdb2 14 2823 Linux

/dev/sdb3 3077 4864 W95 FAT32 (LBA)

/dev/sdb4 2823 3076 Linux Swap/ Solaris

 

The preceding configuration in on my USB drive, and is the output from fdisk -l. Interestingly enough fdisk mentioned "partition table entries are not in disk order;

 

I found that Linux Rescue failed to mount FC into /mnt/sysimage, so I manually mounted FC (/dev/sdb2) onto /mnt/source and mounted /dev/sdb1 to /mnt/source/boot.

 

mkinitrd also failed to make a usbintrd.img file; so I will try James' suggestion. Do I specify /boot/usbinitrd.img after --force-lvm-probe? What is significance of /initrid-etc?

 

Did this --force-lvm-probe work for you Danleff? The 'lvm' looks like Logical Volume Management, but I thought we're not using LVM .

 

 

Share this post


Link to post

I finally succeeded in installing FC5 on USB drive.

 

I took a closer look at James' http://www.vigla.eclipse.co.uk/usb_install.pdf. It was definitely very helpful, and I would also recommend it as a FC USB installation guide with some changes for FC5 installation, eg mkinitrd format.

 

I could run mkinitrd without needing --force-lvm-probe; however some messages were generated, such as /sys/block: no such file or directory and /tmp/initrd.nxl062/lib/scsi_mod.ko (sd_mod.ko).

Share this post


Link to post

Good for you! I have to try one more step in the process, as I think I have it solved, as well.

 

Thanks, james419. I think you hit the nail on the head!

Share this post


Link to post

I am trying to get FC5 on my usb drive. I have two sata drives in my system, as sda and sdb, and the usb drive is sdc.

I have been trying to follow the tips on this matter, but with the LVM partitions. I can't mount the /dev/LogGoup00/LogVol00 (or whatever it's called), because my /dev folder doesn't show them at all, even though running fdisk -l shows my sdc has the following two partitions:

 

/dev/sdc1 boot ext3

/dev/sdc2 LVM partition

 

am I missing something in here? I also tried looking in the /dev/mapper folder, but I have only 'control' in there.

Am I barking at the wrong tree anyway? Has no one been able to get it to work with LVM on USB drives? Should I just try partitioning it without LVM, and then the instructions work (basically - running the mkinitrd with the needed modules, and running it once from the grub console)?

 

I tried it several time a few weeks ago, and I think I was able to get the mkinitrd stage right (it failed later, but now I see I missed some things along the way), and I just can't remember how I mounted the LVM partition.

 

Thanks for the help anyway, it's a good forum, and a good thread.

Share this post


Link to post
Quote:
Am I barking at the wrong tree anyway? Has no one been able to get it to work with LVM on USB drives? Should I just try partitioning it without LVM, and then the instructions work (basically - running the mkinitrd with the needed modules, and running it once from the grub console)?


It seems that the system's bios has a lot to do with the problem. I just tried again and the boot failed, although I was able to configure the graphical grub screen, which was missing before.

Most of the directions that I have seen speak to IDE drives, not sata. The situation is complicated more by using LVM for the filesystem choice.

theng got it going with the traditiional Linux setup for partitions (no LVM) and FC5 seems to have changed some things. Most directions seem specific for FC4.

He also noted;

Quote:
I thought it was just ticking the box that specified 'Hide RAID device/ LVM Vol Group members'; however the same 'magic number' still appeared at FC initialisation then I realised that LVM was still created. Hence, I chose Anaconda's custom layout option for disk partitioning.


Which makes sense, as "hidden" just means that, that the partition is hidden from view, not that it is not created. In his case, he changed over to the traditional partitioning scheme.

I found some other snags in the process and will report back and let everyone know my progress.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×