Skip to main content

Thread: Script edit fstab ?


i want run script edit content of fstab file , run @ boot time, want delete these text "errors = remount-ro" uuid, instead of "ro" , add line bottom , ex: "tmpfs / home tmpfs defaults, siz = xyz 0 0 ". reason created iso file setup ubuntu running on ramdisk remastersys, not saved fstab file, want write script edit it, dont's master script , can me?

i use separate data partitions , install/reinstall test. # own comments on planned improvements or old versions of stuff. als

script data partitions uuids not change though installs uuid new. mounts have created.

code:
#!/bin/bash # make mount points other partitions echo $user mkdir /mnt/cdrive #mkdir /mnt/backup  # windows shared ntfs mkdir /mnt/shared chown $user:$user /mnt/shared chmod 777 /mnt/shared mkdir /mnt/data chown $user:$user /mnt/data chmod 777 /mnt/data #the big "x" not make files executable unless executable begin with.morbius1 #sudo chmod -r a+rwx /mnt/data  # edit fstab add mounts, uuids of data partitions not change cp /etc/fstab /etc/fstab.backup #edit fstab first need change uuid labels, works on both portable & dt str1="# entry /dev/sdc6 :" str2="uuid=a55e6335-616f-4b10-9923-e963559f2b05  /mnt/data    ext3         auto,users,rw,relatime               0  2  " str3="# entry /dev/sda1 :" str4="uuid=04b05b70b05b6768                      /mnt/cdrive           ntfs-3g   defaults,uid=1000,nls=utf8,windows_names   0  0  " str5="# entry /dev/sdc2 :" str6="uuid=44332fd360aa9657                      /mnt/shared  ntfs-3g   defaults,uid=1000,nls=utf8,windows_names   0  0  " fname=/etc/fstab echo $str1 >> $fname echo $str2 >> $fname echo $str3 >> $fname echo $str4 >> $fname echo $str5 >> $fname echo $str6 >> $fname  # verify no errors in fstab & remount new mounts mount -a


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Development CD/DVD Image Testing Script edit fstab ?


Ubuntu

Comments

Popular posts from this blog

Falang and too many redirects - Joomla! Forum - community, help and support

Infinite loop detected in JErrorInfinite loop detected in JError - Joomla! Forum - community, help and support

logged out from joomla! - Joomla! Forum - community, help and support