Skip to content
Snippets Groups Projects
  1. Oct 04, 2014
  2. Oct 03, 2014
  3. Oct 02, 2014
    • nandhp's avatar
      Fix handling of root filesystem with LABEL=/ (/dev/disk/by-label/\x2f) · 782d1665
      nandhp authored
      My root filesystem has label "/". Since creating the filesystem, I have
      realized that this is not the best choice of label, for it results in
      device names like '/dev/disk/by-label/\x2f'. However, I used to use
      labels only for convenience in my partition editor. (I believe this
      naming scheme used to be the default in RedHat.[1])
      
      Yesterday, I switched to using labels in my fstab (LABEL=/ for the root
      filesystem). However, after rebooting, update-initramfs no longer works:
      
          $ sudo update-initramfs -u
          update-initramfs: Generating /boot/initrd.img-3.2.0-4-ixp4xx
          /dev/disk/by-label/x2f: No such file or directory
          mkinitramfs: for root /dev/disk/by-label/x2f missing disk/by-label/x
      /sys/block/ entry
          mkinitramfs: workaround is MODULES=most
          mkinitramfs: Error please report the bug
          update-initramfs: failed for /boot/initrd.img-3.2.0-4-ixp4xx with 1.
          $
      
      The problem is that the `dep_add_modules` function in
      /usr/share/initramfs-tools/hook-functions uses the following routine to
      identify the root block device and its filesystem type:
      
              eval "$( mount | while read dev foo mp foo fs opts rest ; do \
                      [ "$mp" = "/" ] && [ "$fs" != "rootfs" ] \
                      && printf "root=$dev\nFSTYPE=$fs" \
                      && break; done)"
      
      and when presented with the following line from mount,
      
          /dev/disk/by-label/\x2f on / type ext3
      (rw,relatime,errors=remount-ro,barrier=1,data=ordered)
      
      the routine fails for two reasons: 1) the call to read does not use the
      -r option, so the backslash is stripped, and 2) the device name is
      interpolated into the format string of printf (which turns \x2f into a
      literal /).
      
      I propose the following patch, which allows / to be used in disk labels
      (enabling me to rebuild my own initrd). However, some other special
      characters that could appear in disk labels, like apostrophe and space,
      will remain problematic -- a more complete patch might be desirable. I
      believe that version 0.115 is also susceptible to this problem, as it
      uses the same code to identify the root block device, but I have not
      tested it with non-alphanumeric disk labels.
      782d1665
    • Ben Hutchings's avatar
      debian/control: Conflict with linux-initramfs-tool · 305489e1
      Ben Hutchings authored
      
      Closes: #729800
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      305489e1
  4. Sep 30, 2014
  5. Sep 28, 2014
  6. Sep 27, 2014
  7. Sep 25, 2014
  8. Aug 31, 2014
Loading