1 |
P.V.Anthony wrote: |
2 |
> Is there a way to fix the drive assignment for sata drives? |
3 |
> |
4 |
> Currently in the fstab the boot and root partitions are set and |
5 |
> working great. Once a new sata drive connected, the drive assignments |
6 |
> change. Initially the / (root) is /dev/sda2. Once another sata drive |
7 |
> is added the / (root) becomes say /dev/sdb2. |
8 |
> |
9 |
> Is there any way that this can be fixed even when more drives are |
10 |
> added or removed? |
11 |
Use disk labels to symbolically name partitions so that you don't need |
12 |
to use explicit special device names. |
13 |
|
14 |
`tune2fs -L <label name>' adds a disk label to a partition (at least for |
15 |
ext2/3 file systems). |
16 |
|
17 |
Then in /etc/fstab use entries along these lines (assuming you've |
18 |
labeled the boot partition 'BOOT' and the root partition 'ROOT'...) : |
19 |
|
20 |
#------------------- (example) ----------------- |
21 |
|
22 |
LABEL=BOOT /boot ext2 defaults 0 2 |
23 |
LABEL=ROOT / ext3 defaults 0 1 |
24 |
|
25 |
LABEL=fortknox /precious_data ext3 defaults,ro 0 1 |
26 |
|
27 |
# use LABELs for pluggable media since the special devices may change |
28 |
# MS DOS disk labels must be 11 characters and all upper case |
29 |
LABEL=Backup /mnt/Backup auto |
30 |
defaults,users,noauto 0 0 |
31 |
|
32 |
#------------------ (/example) ----------------- |
33 |
|
34 |
|
35 |
I'd guess that there are ways to add labels to non-ext2/3 file systems |
36 |
(reiserfs, xfs, ...) but I haven't tried. |
37 |
|
38 |
As always: read `man tune2fs' and `man mount'. |
39 |
|
40 |
BobS |
41 |
|
42 |
PS. This isn't an amd64 issue. |
43 |
|
44 |
|
45 |
-- |
46 |
gentoo-amd64@g.o mailing list |