0

I have an installation of Debian whose boot partition has been placed on an ext2 formatted usb-stick. Please correct me if I'm wrong, but I believe that in most situations, the usb-stick should not have to be inserted and mounted. Therefore, I'm planning to remove the usb-stick once the computer has finished booting.

In what situations would I have to re-mount the boot partition on the usb-stick and how would I do that correctly? Do I always need to mount in when running apt-get dist-upgrade?

0

You need to add noauto option to the /boot line of your etc/fstab, so the system would not try to mount it each time it boots.

You need to mount the /boot partition before system updates as the lack of files in their places according to the package manager database may disrupt the booting. For example, updates to grub2 and kernel packages usually trigger the grub2-mkconfig execution apart from installing new files. Of course, if you know for sure that the updates to be installed would not touch /boot or /etc/default/grub (or whatever boot process related config files), then you need not to mount /boot

Also, it could be a good idea to create an udev rule matching your USB stick serial number to prevent it from auto-mounting with regular user credentials if your environment does so by default.

  • Thanks for the reply! I suppose you mean that I should create a udev rule to mount it with root as the owner? – lklun Jun 5 '16 at 20:27
  • then it will be mounted upon boot. – Serge Jun 5 '16 at 21:00
  • I'm sorry but I don't quite understand. I found information about noauto here: wiki.archlinux.org/index.php/Dm-crypt/…. If I understand correctly, I should use noauto in order not to automatically mount the usb-stick after finishing booting. Do you mean that I should use udev for mounting the usb-stick as root rather than the currently logged in user when I want to manually mount /boot, e.g. during an update? – lklun Jun 6 '16 at 7:47
  • I meant you should use noauto to prevent the system from mount the /boot at boot time. I meant udev rule IF your system automatically mounts USB disks upon insertion. – Serge Jun 6 '16 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.