You are not logged in.

#1 2009-05-16 04:05:28

gep19
Member
Registered: 2009-05-16
Posts: 6

USB viewed as /dev/sda and hard disk is /dev/sdb -> messes up GRUB

Hello, my name is Greg. Thank you for viewing my problem. I would really appreciate some help.

I have been trying to install Arch on my Asus Eee 1000H via USB drive. I have been successful using a disk but not with a USB.
When I launch the setup and go to partition the hard drive; the usb key is /dev/sda and the hard drive is /dev/sdb.
I tried to follow the wiki guides but it seems to be failing when I install GRUB. If I set it to load from /dev/sdb, the flash drive has to be in the laptopwhen it boots or it will fail. It is the same a situation when GRUB is installed on /dev/sda.

I tried modifing GRUB's arguments as well as the UUID numbers in fstab.

Many of the guides I've found show how to change the numbers by modifying /etc/udev/rules.d but that will only work when I am in the OS.

How do I stop it from seeing the flash drive as /dev/sda or, at least, how can I load GRUB on it correctly?

Thank you for you help.

Offline

#2 2009-05-16 06:19:57

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1,328

Re: USB viewed as /dev/sda and hard disk is /dev/sdb -> messes up GRUB

I think you want to edit /boot/grub/device.map: http://www.gnu.org/software/grub/manual … Device-map

Offline

#3 2009-05-16 12:30:46

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,772

Re: USB viewed as /dev/sda and hard disk is /dev/sdb -> messes up GRUB

What you want to do is edit not just the root=/dev/disk/by-uuid, but the root (hd1,x).

Set it to root(hd0,x), as shown below. Note that the 2nd number (x, mine is 5) needs to follow whatever it is you use, probably 1 or 2. I always install from USB, this is the only change I have to make. But of course, I can't boot with my thumb drive in. Which is not a problem, since my thumb drive is bootable anyway with a fix-it linux install.

# (0) Arch Linux
title  Arch Linux
root   (hd0,5)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/4243a8e3-2795-4677-a9cd-23e1d2408bbf ro
initrd /boot/kernel26.img

Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#4 2009-05-16 14:20:15

gep19
Member
Registered: 2009-05-16
Posts: 6

Re: USB viewed as /dev/sda and hard disk is /dev/sdb -> messes up GRUB

I am sorry but I am confused with the configuration.

Disk /dev/sda: 1021MB, 1021125120 bytes
255 heads, 63 sectors/track, 124 cylinders
Unites = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier = 0x0003b5a0

Device     Boot   Start      End     Blocks     Id    System
/dev/sda1  *            1     124     995998+   b    w95 FAT32

Disk /dev/sdb: 80.0Gb, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 byts
Disk identifier 0x7ffb5d5f

  Device    Boot    Start       End   Blocks        Id    System
/dev/sdb1     *          1       128    1028159+   83   Linux
/dev/sdb2             129       383    2048287+   82   Linux swap / Solaris
/dev/sdb3             384     1340    7687102+   83   Linux
/dev/sdb4            1341    9729   67384642+   83  Linux

ls -l /dev/disk/by-uuid yields:

total 0
lrwxrwxrwx 1 root root 10 2009-05-16 09:33 5b7d2c0b-ef2d-42ad-b51b-6ccad53151ca -> ../../sdb1
lrwxrwxrwx 1 root root 10 2009-05-16 05:32 997F-00A2 -> ../../sda1
 
$ (0) Arch Linux
title Arch Linux
root (hd1,0)
kernel /vmlinuz26 root=/dev/disk/by=uuid/fe301850-1b90-44ec-9381-cafdb2dd88ca ro
initrd /kernel26.img


$ (0) Arch Linux
title Arch Linux Fallback
root (hd1,0)
kernel /vmlinuz26 root=/dev/disk/by=uuid/fe301850-1b90-44ec-9381-cafdb2dd88ca ro
initrd /kernel26.img

If I would to install grub on /dev/disk/by-uuid/*sdb (the hard drive) when I boot up w/o the flash drive, the hard drive is no longer dev/sdb1 but rather /dev/sda1
If I install it on /dev/disk/by-uuid/*sdb (the flash drive), the flash will have grub but the hard disk would not.

What is that uuid in the grub/menu.lst?

Thank you

Last edited by gep19 (2009-05-16 14:21:07)

Offline

#5 2009-05-16 14:55:05

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,772

Re: USB viewed as /dev/sda and hard disk is /dev/sdb -> messes up GRUB

Grub doesn't use /dev/sda or /dev/sdb for what you're thinking off here. Grub looks at the root. In your menu.lst, just change both occurences of root (hd1,0) to root (hd0,0).

Concerning your kernel line, you have altered it, please alter it back to how it was. Based on the ls you have shown, this should be your final menu.lst:-

# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/5b7d2c0b-ef2d-42ad-b51b-6ccad53151ca ro
initrd /boot/kernel26.img


# (1) Arch Linux
title Arch Linux Fallback
root (hd0,0)
kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/5b7d2c0b-ef2d-42ad-b51b-6ccad53151ca ro
initrd /boot/kernel26-fallback.img

Your menu.lst contains so many typos it CANNOT be the one you had by default. What changes have you made, and why. Specifically, why is $ used at all (# is for comments), why do you have a non-existing uuid, why is the hyphen in /dev/disk/by-uuid replaced by a '=', and why does it look as if its looking for the kernel and initrd in the root rather than in /boot/ which is the default?


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#6 2009-05-16 15:03:05

gep19
Member
Registered: 2009-05-16
Posts: 6

Re: USB viewed as /dev/sda and hard disk is /dev/sdb -> messes up GRUB

I am sorry for the "=" instead of the "-" and the $ instead of #

I did not change the uuid or the initrd values. What could that mean?

I would install the BRUG bootloader on /dev/sda?

Last edited by gep19 (2009-05-16 15:30:48)

Offline

#7 2009-05-16 22:49:01

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,772

Re: USB viewed as /dev/sda and hard disk is /dev/sdb -> messes up GRUB

Normally, copy-pasting is much better than typing out values. SNR value is better. But we've all done the 'oops, typo' stuff before.

In any case, now that I've woken up and looked at your df -l results, it seems you have 4 partitions on your hard disc. Perhaps one of them is a separate boot partition? In that case, you would not need the "/boot" in kernel and initrd.

Please post the following:-

a) output of blkid
b) description of your partition structure on your hard disc (which is your /, which is /boot, which is /home). Or are you following the auto-partitioning?

In answer to your question, it is better to install your bootloader on /dev/sdb (assuming that is your hard disc). Installing it on your thumb drive would mean you always have to it inserted to boot, and it would be pointing to your hard disc, which doesn't make sense. You will need to make the above changes to your menu.lst though (perhaps without the /boot if you're using a separate boot partition).


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#8 2009-05-17 02:41:15

gep19
Member
Registered: 2009-05-16
Posts: 6

Re: USB viewed as /dev/sda and hard disk is /dev/sdb -> messes up GRUB

I modified the menu.lst in accordance to how you suggested and I saved the GRUB bootloader to dev/sdb1.
I rebooted and I was met with "GRUB" and nothing else. I did further research and which suggested modifying via GRUB. This, mind you, was with the flash drive removed.

When I put in the flash drive and booted. It said that it could not find the kernel26.img file. I changed the location to /boot/... but didn't work.

I reloaded my flash drive and booted into the UNetbootin prompt. One option said "Default" the other said Arch Live CD.
I checked the boot options of "Default":
It was placing the image files in /  not /boot.

The checked the Arch Live Cd; it places the image files into /boot/.

I loaded into the Arch Live cd and everything worked perfectly. The hard drive was shown as /dev/sda and I didn't have to change the uuid values.

It must have been a problem with the default settings of the boot software.

Thank you for all of your help. I really appreciate it.

Offline

#9 2009-05-17 03:09:28

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 6,772

Re: USB viewed as /dev/sda and hard disk is /dev/sdb -> messes up GRUB

Okay. All my installs have been by unetbootin of the live CD, and I've never had those issues. Oh well, nice thing about Arch is that, once installed, you'll probably never need to reinstall it till something on the machine fails drastically.

Most important thing is that it works smile


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB