Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Different devicenames on different kernels[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
larand54
l33t
l33t


Joined: 20 Feb 2004
Posts: 695
Location: Sweden

PostPosted: Thu Nov 11, 2010 5:20 pm    Post subject: Different devicenames on different kernels[SOLVED] Reply with quote

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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Thu Nov 11, 2010 6:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
jathlon
Tux's lil' helper
Tux's lil' helper


Joined: 26 Sep 2006
Posts: 89
Location: Canada

PostPosted: Thu Nov 11, 2010 6:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
mr.sande
Tux's lil' helper
Tux's lil' helper


Joined: 26 Apr 2010
Posts: 82
Location: Norway

PostPosted: Thu Nov 11, 2010 10:22 pm    Post subject: Reply with quote

I have had this issue myself when I used SATA and IDE devices together, I did the UUID thing.
Back to top
View user's profile Send private message
larand54
l33t
l33t


Joined: 20 Feb 2004
Posts: 695
Location: Sweden

PostPosted: Fri Nov 12, 2010 10:49 am    Post subject: Reply with quote

Thank's for all help :D

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum