View previous topic :: View next topic |
Author |
Message |
larand54 l33t
Joined: 20 Feb 2004 Posts: 695 Location: Sweden
|
Posted: Thu Nov 11, 2010 5:20 pm Post subject: Different devicenames on different kernels[SOLVED] |
|
|
I have 3 disk units in my machine, one 120 gb/ide, one 300gb sata and one 500gb sata.
On the old kernel (2.6.34-r1) the devices got the following names:
300GB: /dev/sda
500GB: /dev/sdb
120GB: /dev/sdc
Then I compiled kernel 2.6.34-r12 with same config but using genkernel which created a initrd-file.
300GB: /dev/sdb
500GB: /dev/sdc
120GB: /dev/sda
So trying to run the new kernel won't work with current fstab.
I thought I could use UUID:s instead of the devicenames but there is no UUID for the swap-file so that doesn't work either.
I don't know what to do, maybe I shouldn't use genkernel?
any ideas?
Last edited by larand54 on Fri Nov 12, 2010 10:50 am; edited 1 time in total |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9677 Location: almost Mile High in the USA
|
Posted: Thu Nov 11, 2010 6:17 pm Post subject: |
|
|
Swap has a label that you can use for match-by-name. They also have UUIDs now...
How are your drives connected to your machine? I've never had such radical device enumeration changes... Except for subsystem detect changes, they tend to remain the same each time. I think the biggest risk I have in changing enumeration is that it's hard to keep track of which SATA port is which on the motherboard... they all look like the same and so close together... _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
jathlon Tux's lil' helper
Joined: 26 Sep 2006 Posts: 89 Location: Canada
|
Posted: Thu Nov 11, 2010 6:23 pm Post subject: |
|
|
You could use labels instead of UUID. There is an switch for mkswap that you can use to assign a label to your swap.
This is what I have in /etc/fstab for swap;
Code: | LABEL=SWAPA none swap sw 0 0 |
Most filesystems tools have a way to assign a label without reformatting the partitions. For jfs it's jfs_tune. For ext2/3/4 its tune2fs. I've played with a few different filesystems and most use the -L switch to set a label. Don't take my word for it though. Read the man page.
more fstab entries using labels;
Code: | LABEL=ROOT / jfs noatime,nodiratime 0 1
LABEL=VAR /var jfs noatime,nodiratime 0 2
LABEL=PORTAGE /usr/portage jfs noatime,nodiratime 0 2
LABEL=HOME /home jfs noatime,nodiratime 0 2
|
joe |
|
Back to top |
|
|
mr.sande Tux's lil' helper
Joined: 26 Apr 2010 Posts: 82 Location: Norway
|
Posted: Thu Nov 11, 2010 10:22 pm Post subject: |
|
|
I have had this issue myself when I used SATA and IDE devices together, I did the UUID thing. |
|
Back to top |
|
|
larand54 l33t
Joined: 20 Feb 2004 Posts: 695 Location: Sweden
|
Posted: Fri Nov 12, 2010 10:49 am Post subject: |
|
|
Thank's for all help
So I just needed to run mkswap to get an UUID on the swap - great! But I decided to choose the "LABEL" way as
the file will be more readable in my opinion.
I also found out that you could use LABEL or UUID to specify root-mounting point in the GRUB-kernel command.
Code: | root (hd2,0)
kernel /kernel-genkernel-x86-2.6.34-gentoo-r12 root=LABEL=root/GEN2 ro vga=0x31b
initrd /initramfs-genkernel-x86-2.6.34-gentoo-r12
savedefault
boot
|
so that may save me some more future problems.
Thank's again! |
|
Back to top |
|
|
|