Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So you want /home/partimag to be deleted on each boot - correct? Add your commands at the end of rc.local file. As for mounting ntfs partition, just add them to /etc/fstab.
These are all shell commands. What does it have to do with your bootloader?
Nonetheless, why delete /home/partimag and then re-create it. Keep the /home/partimag directory and delete everything else under it.
Code:
rm -r /home/partimag
mkdir -p /home/partimag
# Use one command instead:
rm -r /home/partimag/* # This deletes everything under /home/partimag, but keeps /home/partimag
Or, combine the two mkdir commands into one command:
What if I use /mnt instead of /tmp/local_dev? It didn't cause any problem with the booting.
I changed the codes to
sudo su -
rm -r /home/partimag
mkdir -p /home/partimag
ntfs-3g /dev/sdb2 /mnt
mount --bind /mnt/Clones /home/partimag
And it still worked. This way I didn't have to create /mnt and /mnt is much shorter than /tmp/local_dev.
Since I don't know have much knowledge, I was worried that mounting to /mnt could cause problems.
/mnt : Mount point for a temporarily mounted filesystem
Purpose
This directory is provided so that the system administrator may temporarily mount a filesystem as needed. The content of this directory is a local issue and should not affect the manner in which any program is run.
This directory must not be used by installation programs: a suitable temporary directory not in use by the system must be used instead.
So mounting directly to /mnt would work, but it is not standard practice to mount a filesystem directly to /mnt. The standard way is to use a mount point under /mnt.
Yes, I understand that.
On this case; I had to fit the codes into the Grub 256 byte limit. Therefore, mounting to an existing place seemed easier.
Originally, what was advised was to create and put it in /tmp/local_dev.
I am just learning the stuff, so it is like I am experimenting.
Now, I am wondering that if I would get the same result if I created /tmp/a and mounted it there.
I will try probably.
Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.