[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RFC: Possible (partial) solution for device persistence issue

I have written a very simple (or at least small) script intended to be run 
during finish-install that converts devices listed in /target/etc/fstab 
from regular device names to uuids (as far as possible).

Although this is not a perfect solution, I feel it is an acceptable 
solution for Etch.
By doing this at the very end of the installation, there is no chance that 
we break anything in the installer itself, while still making the fstab 
less vulnerable to changes in the device order.
The script relies on the fact that the kernel currently also generates 
"normal" device names for disks.

It is only a partial solution as the set up of the boot loader (especially 
the definition of the root partition) may still be wrong.

I've tested this successfully on a LVM setup. The attached fstab is from 
that install.

Comments welcome.


P.S. IIRC someone once sent a similar script to the list, but I was unable 
to find it :-(
From what I remember, the script was more complex. Not sure if that means 
I'm missing a lot...

Attachment: 40fstab_hd_entries
Description: application/shellscript

# /etc/fstab: static file system information.
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/mapper/Debian-root
UUID=54eb0e28-f41b-486b-9b47-2e8d484e9417 /               ext3    defaults,errors=remount-ro 0       1
# /dev/sda1
UUID=297e4922-7842-4dd2-9f56-09581968bc64 /boot           ext3    defaults        0       2
/dev/mapper/Debian-swap_1 none            swap    sw              0       0
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0

Attachment: pgpTWALHOLdUO.pgp
Description: PGP signature

Reply to: