Can I make these commands shorter?
I need to make this commands shorter to pass through Grub's 256 byte limit.
sudo su - rm -r /home/partimag mkdir -p /home/partimag mkdir -p /tmp/local_dev ntfs-3g /dev/sdb2 /tmp/local_dev mount --bind tmp/local_dev/Clones /home/partimag Unfortunately /home/partimag has to be deleted and then created. I am trying to accomplish mounting sdb2/Clones as /home/partimag (where sdb2 is NTFS). Is there anyway to make these commands shorter? |
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 Code:
mkdir -p /home/partimag /tmp/local_dev |
Combining mkdir helps. Thank you.
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. Thanks again. |
According to the FHS:
Quote:
|
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. |
All times are GMT -5. The time now is 07:58 AM. |