partitioning a u s b drive

B. Henry burt1iband at gmail.com
Thu Mar 2 05:35:01 UTC 2017


Depending on what you mean by a usb drive, e.g. I guess you mean a standard hard drive that you will connect to your computer via a usb port, but maybe 
you mean a usb flash memory stick,(thumbdrive, pendrive, or what ever you like to call those),
   how you partition will vary.
If it is a standard external harddrive you will want to use more or less the same partitioning scheme you use for your internal HDD. You can do the 
partitioning before actually starting the installer and just use the installer's partitioning tool to select the partitions you have created after 
choosing the do something else option when asked where you want to install Ubuntu, (how you want to install perhaps it is worded).
Alternatively, you can select the same thing, but create the partitions and file systems with the installer's partitioning tool. I usually do the first. 
You can also let the installer try and install along side of your existing opperating system(s) and see if it lets you use the free space on the 
connected external, usb drive. 
You will want to format the drive if there is nothing on it you wish to keep. 
If using gparted to format, (my favorite way to do this, and easiest for folks who are less experienced as well as for many Linux experts), you open 
menus and choose the create new partition table option. 
Normally you have two options that make since, ms-dos or GPT. 
Assuming GPT is supported, and I think it will be by your drive, choose that as it is more robust in case of corruption somewhere down the line, but 
I've usually used ms-dos out of habbit. 
Then your usb-drive is ready to go, i.e. you can make the partitions you want. 
You want ext4 partitions in most cases, and as you are asking the chances there is a reason you'd want something else are even lower. You will also need 
a swap partition. If you will always use the external HDD with the same computer then you can just use the swap partition you have on the internal 
drive, that is assuming it has Linux on it and an apropriately sized swap partition on it. Otherwise you will want one Linux swap partition on the 
external drive.
At the least I strongly reccoment putting a separate /home partition on the external drive. 
I've written in some detail about partitioning on the Vinux support list about my thoughts on partitioning in the last year or two, probably before as 
well, so  search the archives for more detail than I'm going to give here.
In brief you probably want at least 15GB for your / (root, not slash root, partition), and assuming you have 80 to 100GB or more I'd make that root 
partition 20GB, as large as 25GB or so if you have plenty of free space, say 150GB or more. 
The swap partition should be a bit more than your total RAM if you have 3GB of physical memory, and as much as double your RAM if you are memory poor 
and can't expand it, say 2GB for 1 gig of RAM, and 2.5 to 3 gigs for 1.5GB of RAM.
You can either use the rest of your free space for /home, or if that is a lot make your self a 30-50GB /home partition and the rest make in to a 
separate data partition. The advantage of making the separate data partition is related to access time mostly, but depending on how you configure things 
can even improve  boot times by a bit. I put large files that I plan on keeping on that data partition, movies, large audio books, .iso images for 
installing opperating systems, etc. I also usually put my google drive folder there. 
Make the root partition closest to the start of your disk, i.e. make it first with the suggested minimum of free space before it, perhaps 1MB, but take  
what ever gparted suggests. Next I usually would put swap, (but a small /home partition of 30GB) could go there, especially if you have plenty of RAM 
and won't need your swap space much), next /home assuming swap was 2nd, and  finally the data partition.
I've experimented with making a /boot partition, but have not noticed any performance difference compared with having /boot on the root partition. 
If you are limiting your Ubuntu space to something under 40 or 50GB then I'd make that root partition smaller, 10 or 12 GB and probably leave out the 
data partition, and if really limited, say 20GB-25GB, consider just running with the standard automatic Ubuntu and Vinux partitioning scheme, everything 
on one partition except for swap. 
Again, ext4 and swap partitions are all you should need to work with, but if putting them on an ms-dos formated drive maybe put/home and one or more 
other partitions on an extended partition since you can only make for primary partitions on  ms-dos formatted drives, (in this case three primary 
partitions and an extended partition where you can put a lot of logical partitions).
If formatting to GPT this is not a worry as you can make more partitions than you will likely ever want on such a disk.
If using a USB memory stick then there are different ways of doing things depending on how you will be using the thumbdrive. 
I found an excellent program for making Ubuntu USB memopry sticks that is accessible, and easy to use that can give you persistent storage so you can 
save your settings and install some extra programs. It still uses squashed file systems, so  you won't be wanting to update anything but the most 
critical applications, Orca for example, but it has worked well for me in my tests, and those include Ubuntu 16.04, a couple flavors of it actually. It 
can install other Linux distros as well, but as I remember some, maybe most won't have a persistent storage option, so you might as well just DD the 
image on to your thumb drive in those cases.
You can also install to a thumbdrive as if it were a normal hard disk, but how you can format it may be limited, and depending on the thumbdrive not all 
file system types will be supported. You probably want to turn journaling off if using ext file systems, and don't put any swap on the usb-stick either.  
I am not very experienced with this last kind of installation, and have had mixed results depending on the pendrive I used. 
If you need more help and can't find the posts on the vinux-su-pport forum, (googlegroup), let me know and I probably either have a copy saved or can 
find some of the posts in the archive, and of course if you need more specific help, feel free to write back on or off list.
             


-- 
     B.H.
   Registerd Linux User 521886


  Daniel Crone wrote:
Wed, Mar 01, 2017 at 10:22:42AM -0600

> Ubuntu 16.04 is on my computer.
> I want to use my ubuntu dvd to install ubuntu to a u s b drive, which has partitions that would need to be reformatted.
> I know that during installing, I would choose, ‘something else’, then go to sdb to do what I need to prepare this drive.
> How may I find out how to format this drive to a linux format?
> -- 
> Ubuntu-accessibility mailing list
> Ubuntu-accessibility at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-accessibility
End of quoted content
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 888 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-accessibility/attachments/20170301/13740166/attachment.pgp>


More information about the Ubuntu-accessibility mailing list