BTS

Issue383

Title grml-rebuildfstab fails (probably because of funny partition order)
Priority bug Status resolved
Superseder Nosy List amne, mika
Assigned To mika Topics

Created on 2008-01-24.16:04:17 by amne, last changed 2009-02-12.21:55:38 by mika.

Messages
msg1863 (view) Author: mika Date: 2009-02-12.21:55:38
Michael Prokop has uploaded a package that should fix your bug.
The changelog is attached below:

grml-scanpartitions (0.4.0) unstable; urgency=low

  * Make sure '/' isn't used as label. Thanks for the bugreport, amne!
    [Closing: issue383]
  * Adjust VCS headers, bump Standard-Version to 3.8.0 and adjust
    build targets in debian/rules to make lintian happy.

 -- Michael Prokop <mika@grml.org>  Thu, 12 Feb 2009 22:28:36 +0100
msg1115 (view) Author: amne Date: 2008-01-28.10:57:05
root@grml ~ # mount /mnt (note: zsh removes the slash from /mnt/ because it's
being smart here)
mount: can't find /mnt in /etc/fstab or /etc/mtab
1 root@grml ~ # mount /mnt/ (note: i typed in the / anyway because i am smarter)
root@grml ~ # mount |grep hda
/dev/hda7 on /mnt type ext3 (rw)

umount works in both cases with /mnt and /mnt/
msg1114 (view) Author: amne Date: 2008-01-28.10:05:03
# vol_id /dev/hda7

ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=d864a01d-4e83-41e9-ae90-53ead3d6e762
ID_FS_UUID_ENC=d864a01d-4e83-41e9-ae90-53ead3d6e762
ID_FS_LABEL=/
ID_FS_LABEL_ENC=\x2f
ID_FS_LABEL_SAFE=
msg1113 (view) Author: amne Date: 2008-01-28.09:32:30
from /etc/fstab
# Added by GRML
/dev/hda1 /mnt/hda1 ntfs
noauto,user,dev,suid,exec,ro,umask=000,uid=grml,gid=users 0 0 # ntfs does not
support mount by label (Win-System)
# Added by GRML
/dev/hda3 /mnt/hda3 vfat noauto,user,dev,suid,exec,umask=000,uid=grml,gid=users 0 0 
# Added by GRML
LABEL=INSTALL /mnt/INSTALL vfat
noauto,user,dev,suid,exec,umask=000,uid=grml,gid=users 0 0 # /dev/hda5
# Added by GRML
/dev/hda6 none swap defaults 0 0 
# Added by GRML
LABEL=/ /mnt/ ext3 noauto,user,dev,suid,exec 0 0 # /dev/hda7
# Added by GRML
LABEL=DATEN /mnt/DATEN vfat
noauto,user,dev,suid,exec,umask=000,uid=grml,gid=users 0 0 # /dev/hda8
# Added by GRML
/dev/sda1 /mnt/sda1 vfat noauto,user,dev,suid,exec,umask=000,uid=grml,gid=users 0 0 

Oops, you're right. INSTALL=5 and DATEN=8

However, hda7 is still a bit funny since i think it has no label, which results
in the mount point being /mnt, and if i try to "mount /mnt", i get an error
(which i didn't copy because i forgot about it, but it was something wrt
couldn't find the mount point in /etc/fstab or mtab)
msg1094 (view) Author: mika Date: 2008-01-25.20:38:53
* Wernfried Haas <bts@bts.grml.org> [20080124 17:04]:

[...]
> root@grml ~ # ls /mnt
> cdrom/  DATEN/  dvd/  external/  external1/  floppy/  grml/  hda1/  hda3/ 
> INSTALL/  sda1/  test/  usb-sda/  usb-sda1/

Alright, took me some time to figure that out (after even
reproducing your setup with help of your /proc/partitions output):

"DATEN" and "INSTALL" seem to be the labels of your hda5/hda6
devices, might this be true? :)

regards,
-mika-
msg1089 (view) Author: amne Date: 2008-01-24.16:22:07
Doesn't happen on a box with 4 "normal" partitions (according to fdisk).

grml-version: grml 64 0.2 rc1
msg1088 (view) Author: amne Date: 2008-01-24.16:04:16
After booting i noticed some partitions were missing their mount points in /mnt.
Ran grml-rebuildfstab again without success: 

root@grml ~ # grml-rebuildfstab
Scanning for new harddisks/partitions/devices.
Adding 7 new partitions to /etc/fstab.
Clean up /mnt/* directories as defined in
/mnt/.grml-auto-created_do-not-delete-this-file.
Creating directories in /mnt/... based on /etc/fstab entries.
root@grml ~ # ls /mnt
cdrom/  DATEN/  dvd/  external/  external1/  floppy/  grml/  hda1/  hda3/ 
INSTALL/  sda1/  test/  usb-sda/  usb-sda1/

root@grml ~ # cat /proc/partitions
major minor  #blocks  name

   3     0   58652496 hda
   3     1   26370666 hda1
   3     2          1 hda2
   3     3    4361647 hda3
   3     5     979933 hda5
   3     6     979933 hda6
   3     7    9767488 hda7
   3     8   16185456 hda8
   7     0     611564 loop0
   8     0    1003520 sda
   8     1    1003504 sda1
root@grml ~ # fdisk -l /dev/hda

Disk /dev/hda: 60 GB, 60052769280 bytes
255 heads, 63 sectors/track, 7301 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        3283    26370666    7  HPFS/NTFS
/dev/hda2            3284        6758    27904905    5  Extended
/dev/hda5            3284        3405      971932    b  FAT32
/dev/hda6            3406        3527      971932   82  Linux swap
/dev/hda7            3528        4743     9759487   83  Linux
/dev/hda8            4744        6758    16177455    b  FAT32
/dev/hda3            6759        7301     4353615   1c  Hidd FAT32 LBA

As you can see, fdisk's output is a bit mixed up (hda3) shows up at the end.
This may have something to do with it.

Will boot the CD on a box with a normal partition layout to confirm it's not a
general bug.
History
Date User Action Args
2009-02-12 21:55:38mikasetstatus: chatting -> resolved
nosy: mika, amne
messages: + msg1863
2008-01-28 10:57:05amnesetnosy: mika, amne
messages: + msg1115
2008-01-28 10:05:04amnesetnosy: mika, amne
messages: + msg1114
2008-01-28 09:32:31amnesetnosy: mika, amne
messages: + msg1113
2008-01-25 20:38:53mikasetnosy: mika, amne
messages: + msg1094
2008-01-24 16:22:07amnesetstatus: unread -> chatting
nosy: mika, amne
messages: + msg1089
2008-01-24 16:04:17amnecreate