disk utility in dom0

135 views
Skip to first unread message

Ted Brenner

unread,
Jan 28, 2017, 2:09:44 PM1/28/17
to qubes...@googlegroups.com
What is the best way to add and partition disks in dom0? I just added some hard drives that I'd like to format and partition and then pass those to a guest VM for storing my person files. With xfce, I don't see any GUI based disk utility. Does this have to be done via the command line?

Thanks!

--
Sent from my Desktop

cez...@gmail.com

unread,
Jan 28, 2017, 8:10:00 PM1/28/17
to qubes-users
As far as I know there are none pre-installed, but I could be wrong. I usually solve this by installing gparted my self.

There are three ways that I know of to install it, all of them are security risks in their own way, either minor or major depending on your environment or what you download into Dom0, etc. One approach to install gparted in Dom0 is adding a repository in Dom0. Another approach is to download gparted through your browser and move it over to Dom0 via shared harddrive or USB, (remember to umount in both Dom0 and Dum0 whenever accessing the opposite, that is Dom0/DomU). It is also possible to just move it with terminal which avoids shared-drives/USB transfer altogether. Whichever method you use, all are a security risk in their own rights, though trusting Fedora/gparted, and you trust your USB devices then, then you should be fine.

Terminal move approach is more secure method if you don't trust your shared drives or USB device in Dom0, Qubes has official guides for how to do that with the terminal.

So in order to use two of the above three methods to transfer the file to Dom0, grab and download gparted https://koji.fedoraproject.org/koji/packageinfo?packageID=1950

Once you downloaded it and moved it over to Dom0, then open the Dom0 terminal, and write "sudo yum install /path-to-gparted-rpm-in-Dom0" or just write "sudo yum install" and drag and drop the file to automatically generate the path after the install part.

After install just type gparted in terminal to start it.

Best to avoid installing or moving anything to Dom0 as far possible, but sometimes it just isn't practical, i.e. gparted is really nice to have. Maybe Qubes has a build-in partition manager, but I never managed to find it, so this is what I do.

Keep in mind this is just what I do to work around it, it might or might not be best practice.

cez...@gmail.com

unread,
Jan 28, 2017, 8:15:33 PM1/28/17
to qubes-users
Btw, forgot to add just in case, be sure to download the gparted that matches the Fedora version which Dom0 is running on. If you are running Qubes 3.2, then it is likely to be Fedora 23. Also be mindful of downloading to the right architecture matching your system, there are 3 architecture RPM download choices once you click on the Fedora version.

Ted Brenner

unread,
Jan 28, 2017, 8:42:55 PM1/28/17
to cez...@gmail.com, qubes-users
I assume this is something that could be done during install right? Does seem like something should already be there. Though having gparted seems worthwhile. Thanks for the help!

On Sat, Jan 28, 2017 at 7:15 PM, <cez...@gmail.com> wrote:
Btw, forgot to add just in case, be sure to download the gparted that matches the Fedora version which Dom0 is running on. If you are running Qubes 3.2, then it is likely to be Fedora 23. Also be mindful of downloading to the right architecture matching your system, there are 3 architecture RPM download choices once you click on the Fedora version.

--
You received this message because you are subscribed to the Google Groups "qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscribe@googlegroups.com.
To post to this group, send email to qubes...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/3eca86f0-cb65-447a-b277-40d9c5b2436b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cez...@gmail.com

unread,
Jan 28, 2017, 9:16:38 PM1/28/17
to qubes-users, cez...@gmail.com
Den søndag den 29. januar 2017 kl. 02.42.55 UTC+1 skrev Ted Brenner:
> I assume this is something that could be done during install right? Does seem like something should already be there. Though having gparted seems worthwhile. Thanks for the help!
>
>
> On Sat, Jan 28, 2017 at 7:15 PM, <cez...@gmail.com> wrote:
> Btw, forgot to add just in case, be sure to download the gparted that matches the Fedora version which Dom0 is running on. If you are running Qubes 3.2, then it is likely to be Fedora 23. Also be mindful of downloading to the right architecture matching your system, there are 3 architecture RPM download choices once you click on the Fedora version.
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "qubes-users" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users...@googlegroups.com.
>
> To post to this group, send email to qubes...@googlegroups.com.
>
> To view this discussion on the web visit https://groups.google.com/d/msgid/qubes-users/3eca86f0-cb65-447a-b277-40d9c5b2436b%40googlegroups.com.
>
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
> --
>
> Sent from my Desktop

Don't think it can be included during install, it isn't like old-school Linux in that sense. The reason most of Dom0 has been stripped is presumably to reduce the attack surface. But as you said, partition management indeed is really something of the sorts of is "mandatory". Hard to picture how such small, simple and widely used open source tool, that doesn't use internet access, can be a security risk. Maybe I missed something, but in the event it indeed can pose a security risk, then it would be nice with some write-up or documentation to learn why. If nothing else, not to leave us puzzled and scratching the backs of our heads.

No probs btw, hope it works out.

Ángel

unread,
Jan 29, 2017, 7:26:01 PM1/29/17
to qubes...@googlegroups.com
I would recommend you to simply attach the disks to be formatted into a
VM and format them there. What's the point of exposing dom0 to them?
You can later attach them to the same or different VM for usage.


aperi....@gmail.com

unread,
Jan 30, 2017, 2:58:44 PM1/30/17
to qubes-users, qu...@16bits.net
Is it reliable though? For example will the result always be exactly the same as if the drive was managed in Dom0? Does the used file-system matter if applied through a VM or are any possible factors completely unaffected? For example is there a difference to manage BTRFS, ZFS, NTFS, EXT4, random exotic FS, RAID of any build kind, HDD/SSD, old or new cutting edge drive technologies, or any other possible factor, through a VM compared to a bare metal OS?
Anything at all to look out for if undertaking changes on a drive through a VM?

Does it pose a risk change in the rate of bit errors? For example from file system or drive error odds with an 1 in 10^15, to 1 in 10^7 risk increase?
It is after all better to be proactive to prevent possible issues, than it is to leave it unknown, when it comes to precious irreplaceable important data.

Best practice in terms of security, yes sure, but is it also best practice in terms of data integrity? Is there any possible trade-offs here to be aware of?

There may be no difference at all, or there may be. But the point is, for those not in the knowing, which one is it? It would be great to be reasonably certain when using new technology where important data is involved, where common sense may need an update, rather than being among the first victims due to outdated assumptions, relics of an old age in an ever faster changing world.

So taking all that into account, all possible factors included, is it really just as reliable to manage drives in VM's as when done in Dom0?

Ted Brenner

unread,
Jan 30, 2017, 10:34:34 PM1/30/17
to aperi....@gmail.com, qubes-users, qu...@16bits.net
Thanks all for your help. I assume fdisk can do all this right? And that does appear to be in dom0. 

--
You received this message because you are subscribed to the Google Groups "qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qubes-users+unsubscribe@googlegroups.com.

To post to this group, send email to qubes...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ted Brenner

unread,
Jan 31, 2017, 11:25:19 PM1/31/17
to aperi....@gmail.com, qubes-users, qu...@16bits.net
Fortunately I was able to accomplish this using fdisk without having to install anything new. One thing I haven't been able to figure out though, when I attach it to one of my appVMs, I don't know where to find it. This page mentions /run/media/user/ but I don't see /run/media directory. Is there somewhere else I should be looking?

Thanks!

Chris Laprise

unread,
Feb 1, 2017, 12:06:08 AM2/1/17
to Ted Brenner, aperi....@gmail.com, qubes-users, qu...@16bits.net
On 01/31/2017 11:25 PM, Ted Brenner wrote:
> Fortunately I was able to accomplish this using fdisk without having
> to install anything new. One thing I haven't been able to figure out
> though, when I attach it to one of my appVMs, I don't know where to
> find it. This page
> <https://www.qubes-os.org/doc/external-device-mount-point/> mentions
> /run/media/user/ but I don't see /run/media directory. Is there
> somewhere else I should be looking?
>
> Thanks!
>

Attached volumes get named /dev/xvdi[1,2,3,...] /dev/xvdj[1,2,3,...] etc.

Those are block devices. If they don't automatically show up in the
sidebar of Files/nautilus, you need to mount them with a command like:
$ sudo mount /dev/xvdi1 /mnt/myvolume

Chris
Reply all
Reply to author
Forward
0 new messages