FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-11-2008, 11:04 PM
Aniruddha
 
Default What is the best way to deal with changing device names in Debian?

Regularly my hard disk device names change ( e.g. from sdc to sdh to sdb
etc). When this happens it becomes impossible to boot.

To prevent this from happening I 've added 'disk/by id' to fstab
(because the disks uuid were also changing) and 'boot from uuid' to my
menu.lst I wonder:

-What is the best way to prevent the device names change from happening?
-If it happens what is the best way to quickly fix this problem?

Regards,

Aniruddha



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-11-2008, 11:11 PM
Shachar Or
 
Default What is the best way to deal with changing device names in Debian?

On Tuesday 12 August 2008 02:04, Aniruddha wrote:
> Regularly my hard disk device names change ( e.g. from sdc to sdh to sdb
> etc). When this happens it becomes impossible to boot.
>
> To prevent this from happening I 've added 'disk/by id' to fstab
> (because the disks uuid were also changing) and 'boot from uuid' to my
> menu.lst I wonder:

The UUID's belong to the filesystems, not the disks. I've never heard of them
changing between reboots. Use the blkid command to see them. Here's my fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
UUID="f94f5a03-67ca-4932-a9d5-2328776c6285" /boot ext3 defaults
UUID="8a4fb183-7092-4041-af8f-41158e356df1" / ext3 defaults,errors=remount-ro
0 1
UUID="4833592d-6afa-46c2-8c7c-35b85c7ac4ea" none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,utf8 0 0

# backup HDD
UUID="a38d9a47-e26d-4e0f-8c73-24f30decd052" /mnt/backup_hdd ext3
defaults,noauto 0 0

>
> -What is the best way to prevent the device names change from happening?
> -If it happens what is the best way to quickly fix this problem?
>
> Regards,
>
> Aniruddha

--
Shachar Or | שחר אור
http://ox.freeallweb.org/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 08-11-2008, 11:15 PM
Robin
 
Default What is the best way to deal with changing device names in Debian?

2008/8/12 Shachar Or <dawnlight@lavabit.com>:
> On Tuesday 12 August 2008 02:04, Aniruddha wrote:
>> Regularly my hard disk device names change ( e.g. from sdc to sdh to sdb
>> etc). When this happens it becomes impossible to boot.
>>
>> To prevent this from happening I 've added 'disk/by id' to fstab
>> (because the disks uuid were also changing) and 'boot from uuid' to my
>> menu.lst I wonder:
>
> The UUID's belong to the filesystems, not the disks. I've never heard of them
> changing between reboots. Use the blkid command to see them. Here's my fstab:
>
> # /etc/fstab: static file system information.
> #
> # <file system> <mount point> <type> <options> <dump> <pass>
> proc /proc proc defaults 0 0
> UUID="f94f5a03-67ca-4932-a9d5-2328776c6285" /boot ext3 defaults
> UUID="8a4fb183-7092-4041-af8f-41158e356df1" / ext3 defaults,errors=remount-ro
> 0 1
> UUID="4833592d-6afa-46c2-8c7c-35b85c7ac4ea" none swap sw 0 0
> /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,utf8 0 0
>
> # backup HDD
> UUID="a38d9a47-e26d-4e0f-8c73-24f30decd052" /mnt/backup_hdd ext3
> defaults,noauto 0 0
>
>>
>> -What is the best way to prevent the device names change from happening?
>> -If it happens what is the best way to quickly fix this problem?
>>
>> Regards,
>>
>> Aniruddha
>
> --
> Shachar Or | שחר אור
> http://ox.freeallweb.org/


I used get it occasionally if I had usb mass storage device plugged in
when the computer was booted.

--
rob


http://www.worldcommunitygrid.org/team/viewTeamInfo.do?teamId=82BS4ZCMFR1
 
Old 08-17-2008, 05:35 PM
abel
 
Default What is the best way to deal with changing device names in Debian?

On Tue, 12 Aug 2008 02:32:04 +0300
Andrei Popescu <andreimpopescu@gmail.com> wrote:

> I prefer to use labels, because they are readable (compared to
> UUID)
>
> $ grep '^# kopt' /boot/grub/menu.lst
> # kopt=root=LABEL=sid ro vga=0x368
>
> You have to run 'update-grub' after changing this
>
> $ grep sid /etc/fstab
> LABEL=sid / ext3
> errors=remount-ro,noatime,commit=600 0 1
>
> For ext2/3 you set the labels with e2label.

question 1 -->

current menu.list lines are:
title Debian GNU/Linux, kernel 2.6.24-1-amd64
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-1-amd64 root=/dev/hda1 ro vga=792
initrd /boot/initrd.img-2.6.24-1-amd64

given :
hoss64:~/misc/dev-vs-label# e2label /dev/hda1
lenny
hoss64:~/misc/dev-vs-label#

new menu.list lines should be:
title Debian GNU/Linux, kernel 2.6.24-1-amd64
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-1-amd64 root=LABEL=lenny ro vga=792
initrd /boot/initrd.img-2.6.24-1-amd64

Are the new menu.lst lines correct?


question 2 -->
update-grub should be run after the update to /etc/fstab.
correct?

Thanks.
 
Old 08-17-2008, 06:51 PM
abel
 
Default What is the best way to deal with changing device names in Debian?

On Tue, 12 Aug 2008 10:21:30 +0200
Aniruddha <mailing_list@orange.nl> wrote:

> On Tue, 2008-08-12 at 10:26 +0300, Andrei Popescu wrote:
> > I *think* it works, but this is your data...
> >
> > > I suspect that running update-grub isn't mandatory, I can always
> > > update menu.lst by hand right?
> >
> > Of course, but if you update the kernel stanza directly your
> > changes will be overwritten on the next kernel upgrade
> >
> > Regards,
> > Andrei
>
> Ok, I'll use e2label from a livecd (hence my question about chrooting
> Debian). Off course I use the space beneath the automagic kernel
> list . I have to do this because Debian automagically configures
> menu.lst wrong, but this is another story.
>
>

as reference I found this:
"The ext2 library has been enhanced to make tune2fs safe to run on
mounted filesystems. (Users could usually get away with using tune2fs
on mounted filesystems before, but with the advent of ext3 and
journaling, it became important to make tune2fs was *really* safe for
use even when the filesystem being modified is mounted.) E2label is
now implemented by tune2fs using an argv[0] dispatch, so that e2label
is also now safe for use on mounted filesystems."
from here: http://www.math.ias.edu/doc/e2fsprogs-1.35/RELEASE-NOTES
 
Old 08-18-2008, 10:53 AM
Shachar Or
 
Default What is the best way to deal with changing device names in Debian?

On Sunday 17 August 2008 20:35, abel wrote:
> On Tue, 12 Aug 2008 02:32:04 +0300
>
> Andrei Popescu <andreimpopescu@gmail.com> wrote:
> > I prefer to use labels, because they are readable (compared to
> > UUID)
> >
> > $ grep '^# kopt' /boot/grub/menu.lst
> > # kopt=root=LABEL=sid ro vga=0x368
> >
> > You have to run 'update-grub' after changing this
> >
> > $ grep sid /etc/fstab
> > LABEL=sid / ext3
> > errors=remount-ro,noatime,commit=600 0 1
> >
> > For ext2/3 you set the labels with e2label.
>
> question 1 -->
>
> current menu.list lines are:
> title Debian GNU/Linux, kernel 2.6.24-1-amd64
> root (hd0,0)
> kernel /boot/vmlinuz-2.6.24-1-amd64 root=/dev/hda1 ro vga=792
> initrd /boot/initrd.img-2.6.24-1-amd64
>
> given :
> hoss64:~/misc/dev-vs-label# e2label /dev/hda1
> lenny
> hoss64:~/misc/dev-vs-label#
>
> new menu.list lines should be:
> title Debian GNU/Linux, kernel 2.6.24-1-amd64
> root (hd0,0)
> kernel /boot/vmlinuz-2.6.24-1-amd64 root=LABEL=lenny ro vga=792
> initrd /boot/initrd.img-2.6.24-1-amd64
>
> Are the new menu.lst lines correct?

I'm sure there's documentation available about this.
>
>
> question 2 -->
> update-grub should be run after the update to /etc/fstab.
> correct?
>
> Thanks.

--
Shachar Or | שחר אור
http://ox.freeallweb.org/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 06:53 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org