[Solved] Help with fstab entries please

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
russellz
Level 3
Level 3
Posts: 174
Joined: Sat Nov 24, 2012 7:02 am
Location: Millas, France

[Solved] Help with fstab entries please

Post by russellz »

Hi
I would like to put my Virtualbox virtual machines in a separate partition on my laptop. I have created a partition sda9 for them and have tried adding the following at the end of the fstab file:

Code: Select all

# mount VirtualBox\ VMs at boot
/dev/sda9 /home/russell/VirtualBox\ VMs ext4 defaults 0 0
However all that does is cause the system to crash on boot! I have clearly misunderstood the instructions! Can anyone tell me what I have done wrong please? The directroy "/home/russell/VirtualBox VMs" already exists but is empty.

Russell
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Laptop: HP17bs086nf, Intel Core i5-7200U, Intel HD Graphics 620 . Mint Cinnamon 21.1
Desktop: ASUS Prime B760-plus D4 motherboard, AMD Radeon RX6500XT, Intel 12th gen i7 12 core 3500MHz, 8GB ram, 500GB Samsung SSD, Mint Cinnamon 21.1
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Help with fstab entries please

Post by rene »

Assuming that you did in fact format /dev/sda9 as ext4 the issue is likely the space in the mountpoint. Yes, escaping with a backslash used to and should work but these days systemd parses fstab to implicitly turn entries into .service files and adds its own set of poorly defined rules: here, it also stumbled over a space in a NFS share name. That is, first of all try if /home/russell/VirtualBox\040VMs brings goodness. [edit] Let me add that if /home is not on / and/or encrypted you should of course also make sure that /home/russell is accessible before this mount is attempted or mount it elsewhere[/edit]

If yes, also note that /dev/sda9 is not a preferred specifier these days; device naming is not guaranteed to remain stable. Run blkid /dev/sda9 and use e.g. UUID=32...6c instead of /dev/sda9 (without the quotes from the blkid output). If blkid does not show you a UUID you appear to not have ext4-formatted it.
Last edited by rene on Mon Feb 19, 2018 10:55 am, edited 1 time in total.
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Help with fstab entries please

Post by Flemur »

russellz wrote: Mon Feb 19, 2018 9:53 amI would like to put my Virtualbox virtual machines in a separate partition on my laptop.
I did that the simple way:
- create it normally.
- copy it (the VM file of 5-10GB or so) to where you want it (on a different partition).
- edit an existing XML file - which points to the old VM - to point to where it actually is.
The last step is vague because I no longer use vbox, but the file should be somewhere under
~/.vbox or ~/.config/vbox (or "virtualbox" instead of vbox; or "VirtualBox").

Edit: another idea: move the VM file and make a link to it.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
russellz
Level 3
Level 3
Posts: 174
Joined: Sat Nov 24, 2012 7:02 am
Location: Millas, France

Re: Help with fstab entries please

Post by russellz »

Thanks guys,

I removed the space from the directory name and it works fine now. It seems rather strange that "mount" works with the space and escape character but "fstab" doesn't.
I will also change to using the UUID as it is the preferred way.

Russell
Laptop: HP17bs086nf, Intel Core i5-7200U, Intel HD Graphics 620 . Mint Cinnamon 21.1
Desktop: ASUS Prime B760-plus D4 motherboard, AMD Radeon RX6500XT, Intel 12th gen i7 12 core 3500MHz, 8GB ram, 500GB Samsung SSD, Mint Cinnamon 21.1
Locked

Return to “Storage”