Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I made an Ubuntu Live USB Stick with the LinuxUSBDownload installer. The installer works great and also the well known issue of not unmounting the casper-rw at shutdown is fixed. :D

The problem now is that I have 3 partitions on my USB drive. One partition is an ext4 partition on which my personal data should be stored. I would like to have this mounted on boot, so I added these lines to fstab:

/dev/disk/by-id/usb-Kingston_DT_Ultimate_G2_0018F30C9F8ABC6081AD0090-0:0-part5  /mnt/home2  ext4  defaults  0 2

When saved mount /mnt/home2 works fine but after reboot fstab is restored to this default values:

overlayfs / overlayfs rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
/dev/sda5 swap swap defaults 0 0

Because of that my ext4 partition couldn't be mounted on boot. Now I thought of adding a

mount -t ext4 -o defaults /dev/disk/by-id/usb-Kingston_DT_Ultimate_G2_0018F30C9F8ABC6081AD0090-0:0-part5 /mnt/home2 

to my /etc/init.d/rc.local

But isn't there a better way to do that with fstab?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Edit this file here.

/usr/share/initramfs-tools/scripts/casper-bottom/12fstab

http://askubuntu.com/questions/56719/what-file-resets-fstab-on-persistent-live-environments

share|improve this answer
    
Thank you very much!!! Works brilliant! This helps me a lot! I really would like to rate your answer up but because I'm new to superuser I'm not allowed to :( –  MinecraftBhil Nov 21 '12 at 21:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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