On Fri, Mar 24, 2017 at 04:26:10PM +0000, William Fisher wrote:
> Can you give an example of the mkfs command to create a compatible storage
> drive for my Qubes system since the SSD is booting and running Qubes?
> On Fri, Mar 24, 2017 at 10:46 AM Unman <un...@thirdeyesecurity.org> wrote:
> 
> > On Fri, Mar 24, 2017 at 03:30:31PM +0000, William Fisher wrote:
> > > Thank you!
> > > On Fri, Mar 24, 2017 at 10:25 AM Reg Tiangha <r...@reginaldtiangha.com>
> > > wrote:
> > >
> > > > On 03/24/2017 08:31 AM, William Fisher wrote:
> > > > > On Friday, March 24, 2017 at 10:12:21 AM UTC-4, William Fisher wrote:
> > > > >> On Friday, March 24, 2017 at 1:42:54 AM UTC-4, Reg Tiangha wrote:
> > > > >>> On 03/23/2017 11:41 PM, William Fisher wrote:
> > > > >>>> Thank you. I'll try it. What's the command to start gparted?
> > > > >>>>
> > > > >>> You can type gparted on the command line, or it'll show up in your
> > > > >>> application menu and you can start it that way.
> > > > >> I loaded gparted but it doesn't address or see the HD.(The HD is
> > listed
> > > > in dom0 as storage) How do I "attach" the drive to the VM with gparted?
> > > > > or... how can I run gparted in dom0, and should I???
> > > > >
> > > > In Qubes Manager, right click on your VM and the drive should be listed
> > > > under "Attach/detach Block Devices." Select the drive and it should
> > then
> > > > be visible to the VM. Launch gparted and then it should be able to see
> > > > the drive.
> > > >
> > > >
> > > > --
> >
> > You dont have to do this, of course.
> > because the drive is already attached to dom0 you can use the tools
> > already there:
> >
> > fdisk/cfdisk to create or delete partitions
> > mkfs (and its derivatives) to format.
> >

Hello William,

Please try not to top post when mailing the list.

Most of this is standard, and you will find many good gudes online. In
brief, you want something like this-

I assume you have a single partition, and it appears in dom0 at
/dev/sdb1. Make sure you know which disk and partition you are working
on - otherwise things may get very bad.
Of course, have backups.

You can format this to ext4 by doing this as root:
mkfs.ext4 /dev/sdb1

You will lose all the data on the existing partition, so if you want to
keep it, back it up first.
(Almost all of this requires root access so either use sudo or 'sudo su'
to get root.)

You can examine the disk, and repartition it if you want using 
'cfdisk /dev/sdb'
That tool is quite easy to use.



Note that this partition wont be encrypted like your main Qubes
partition. This may not worry you, particularly if you only intend to
use it for encrypted backups.
But if you do want  an encrypted disk, the process is somewhat more
involved, particularly if you want to use the same password as your
main Qubes disk, so you only need to enter one password.

Look in /dev/mapper to check the current name of your encrypted disk:
say luks-stringofstuff
'cryptsetup status luks-stringofstuff' - will show you the current
configuration.

Use fdisk or cfdisk to create a Linux partition on /dev/sdb
at sdb1
Then make an encrypted filesystem, using the SAME config as your main
disk: e.g.
'cryptsetup luksFormat /dev/sdb1 --key-size=512 --cipher=aes-xts-plain64'
When prompted use the same password you use for the main disk.

Then open the disk and create the filesystem:
'cryptsetup luksOpen /dev/sdb1 data_enc'
'mkfs.ext4 /dev/mapper/data_enc'
'cryptsetup luksClose data_enc'

If you want to automatically mount the new drive at boot, then you need
to add it to  /etc/fstab:
First get the UUID:
'blkid /dev/sdb1'
This will show you the UUID, and type which should be crypto_LUKS

Edit the file /etc/crypttab and add a line:
data_enc        UUID=longlineofstuff none luks

Then make sure that the decrypted partition is mounted:
edit the file /etc/fstab, and add a line:
/dev/mapper/data_enc    /store  ext4    defaults        0       2

I hope that doesn't seem too complicated.
You can get more information online, or by using man for information -
e.g. man fstab
Be very careful and make sure you know what you are working on. And , of
course, have backups. (Did I say that before?)

unman

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/20170324205905.GA15199%40thirdeyesecurity.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to