1

I am not exactly a newbie linux user (I use mostly debian based distros for years) but I have to ask because it is a complicated question.

I have an external hard drive and I want to use it with the best way I can imagine:

  1. It has to contain the needed partitions to be used as a live usb with enough persistent space for useful packages. I will use the way I found here (I hope this way I will have the option to install ubuntu to other PCs with the help of my external drive and to run ubuntu in any PC)->see Edit bellow

  2. I would like to have some (the most) of the space of my external drive for backups and for any useful file I want to save and to carry. (I want this partition ntfs or fat32 to can view my files from any OS -but I am open to discuss it-)

  3. I would like to use this disk as a backup-restore disk for my windows and so I need an ntfs partition for that because windows doesn't allow other kind of filesystem for this job.

  4. Any other usefull partition like swap or bios-grub or efi that needed to have access from every PC to my files and to my live ubuntu

My question is: How can I proceed to make this happen?

Step by step please (include links where needed and detailed answer including the kind of partition table that would be better etc)

PS: I tried to make it featured question and give some points but probably I am too new to the "forum" :(

Edit: Finally after a discussion with @sudodus and the comments of the others, I decided that the live OS functionality of the external HD costs more and offers less than I expected... I tested the functionality of live usb with persistent storage and I found out that windows complains with many of the partitions until finding the last one that can be used as storage... This is not good for a storage device (and that functionality of an external drive is more important)... Additionally... the drive will be much slower than a flash drive and this makes me to decide to use my HD as storage device... The other expectations remaining and I am close to decide to make a Gpt partitioning and have ntfs for windows restore files... ext4 for files I can acces from everywhere and may be one or more ext4 (if i find a reason for this)

koleygr
  • 177
  • The basic approach would be to create a persistent live drive with mkusb. You may want to edit the partition table with gparted afterwards, for example to 'steal' some drive space from partition #1 with NTFS for a FAT32 partition, if you want to read/write data from MacOS, and to create a swap partition. Maybe you can take a shortcut and clone from one of the compressed image files with persistent live systems found via this link, https://help.ubuntu.com/community/mkusb/persistent#Compressed_image_file_with_a_persistent_live_system – sudodus Jun 18 '17 at 05:58
  • Thank you for the answer... I found easier the manual way for the parsistent partition from the link I gave in my question... I think the mkusb way does not allow to create my own partition table but doing whatever wants with my external drive.. Also I think I can not edit the partition table of a device after used some of it's partitions... Am I wrong? I did not understood yet what exactly are the compressed image files there... I thought I had to start with a live cd and add the packages I need... but I am going to read more from that link.. Thanks again – koleygr Jun 18 '17 at 06:19
  • I will try to help you here, but maybe the Ubuntu Forums is a better place for a dialogue, where we can gradually understand each other, and you can get the system, that works well for you in the external hard disk drive. See these links, https://ubuntuforums.org/showthread.php?t=1958073 ; https://ubuntuforums.org/showthread.php?t=1958073&page=35 – sudodus Jun 18 '17 at 06:26
  • You can edit the partition table 'afterwards', as illustrated by this link, http://phillw.net/isos/linux-tools/uefi-n-bios/GrowIt.pdf (The server seems to be down temporarily, but should be up and running soon. If not, I will upload the pdf file somewhere else.) – sudodus Jun 18 '17 at 06:29
  • Thanks... I am reading the links you gave me... (the last one doesn't open) – koleygr Jun 18 '17 at 06:35
  • Alternate link, that should work now: https://help.ubuntu.com/community/Installation/UEFI-and-BIOS?action=AttachFile&do=view&target=GrowIt.pdf – sudodus Jun 18 '17 at 06:41
  • Ok... that works... I see there that you can change the sizes etc of any partition and I know that (although I did knew all that stuff explained in there and I will read again)... but you do not change the kind of the partition table... you just change the sizes... Once the partition table has been created (gpt for example) vand you have a partition in there... it is impossible to change the partition table (from gpt to something else) without deleting the partition... – koleygr Jun 18 '17 at 06:55
  • If flash drive is larger 32GB or more, or perhaps even 16GB, you can do a full install of Ubuntu & have multiple ISO directly booted by grub. https://help.ubuntu.com/community/Grub2/ISOBoot & http://askubuntu.com/questions/845192/can-i-create-a-dedicated-partition-for-gparted-and-launch-from-grub sudodus also has posted how to make a flash drive both UEFI and BIOS bootable, but I think then live installer since not updateable may work better. – oldfred Jun 18 '17 at 14:31
  • thank you @oldfred... we are not talking about a usb drive here but about an external HDD that would be used as live OS too... I will edit my question if I can because finally I found out that it is probably bud idea to use the disk for live system(s)... A usb is better for this job and you will not lose the external disks advantages (as the easy windows acces etc) if you don't use it as live persistent os... I am close to deside not to include partition for live system if it costs to usability of the HD (I tested mkusb on a usb drive and a windows PC opens many windows that ask to format) – koleygr Jun 18 '17 at 15:08
  • If actual HDD, full install is probably better as live installer normally erases drive. And some live installers use the hybrid DVD/flash drive configuration which does not have standard partitions. I use only gpt partitioning now, and did for all drives except my old XP drive even when I only had BIOS boot. If system is UEFI or ever planned in future to be with a newer system you need the ESP - efi system partition. http://askubuntu.com/questions/743095/how-to-prepare-a-disk-on-an-efi-based-pc-for-ubuntu – oldfred Jun 18 '17 at 16:30
  • thanks @olfred... I use gpt too for my internal drives... but I am not sure about the external (it will be just storage now)... I think it will be gpt too so that can be easier accessed from my win ass storage and as "recovery storage" of this is possible... thank you about the UEFI info too.. but i have just a storage device now and thinks are simpler – koleygr Jun 18 '17 at 16:38
  • I also suggest every data drive have at least a small / (root) partition for emergency boot. And then you need either ESP or bios_grub ( I always add both) for boot loaders. Those all can be smaller so not using a lot of space that you want for data. – oldfred Jun 18 '17 at 18:05
  • I saw that you have decided how to configure and use your external hard disk drive. It is good to decide after discussing and testing some alternatives. Good luck :-) – sudodus Jun 18 '17 at 18:56
  • @oldfred I would like to know about the small / partition for emergency boot... Is this for a specific OS? I use multiboot systems and I am not sure if I need it because always I will find a working OS if my disk is ok... But if you can share more details, we can add them to the answer (even if I will not use it)... sudodus I appreciate your help! I could not decide without your help and suggestions. – koleygr Jun 18 '17 at 19:13
  • If you have multi-boot and know that, then you are ok. Its just I like to have a current version operating system on every drive. Drives are now so large that 20 or so GB for another / partition is not much of space. And then I directly from grub can loopmount boot all the ISO that want directly. – oldfred Jun 18 '17 at 20:27
  • @oldfred, I am almost ready to write the final answer.... Is this link: https://www.maketecheasier.com/run-iso-files-hdd-grub2/ something that talks about your way? or you are talking about someting else?... I would like more info about your / parftition anf if it can contain one or more isos.... May be I will not do it... but I want to make this post usefull for everyone interested – koleygr Jun 19 '17 at 03:20
  • The link I posted above is the same loop mount in grub of ISO files. Not all ISOcan be loopmounted. I use full install with then / so grub is installed. But have just installed grub to MBR with BIOS, or ESP with UEFI to boot ISO on smaller flash drives. But then you have to totally maintain grub.cfg. But if booting ISO you have to maintain those also. This user explains some pros & cons of separate / partition, except I use Ubuntu. http://www.troubleshooters.com/linux/knoppix/knoppix_partition.htm – oldfred Jun 19 '17 at 14:14

3 Answers3

2

You're asking for a lot, and some of it's unique to your specific needs and desires. Thus, you may not find an exact match to those needs, and asking for step-by-step instructions to meet those needs is unreasonable -- the time demands to create and test a procedure are too great on those of us who answer questions here. (We aren't paid to do this, you know!) That said, perhaps one or more of the following procedures will get you close to what you want:

Some specific issues you may encounter that might not be addressed by the preceding questions include:

  • BIOS vs. EFI -- A transition in firmware from BIOS to EFI/UEFI began quite a few years ago, but late 2011 was a tipping point. At that point, most manufacturers discontinued most of their pure-BIOS systems in favor of EFI-based systems. Most EFI-based computers include a feature called the Compatibility Support Module (CSM), which enables them to boot older OSes intended for BIOS-based computers; but the CSM might or might not be active. Thus, to support any x86-64 computer, the boot medium must provide both BIOS-mode and EFI-mode boot loaders. This is possible, but most instructions address installing just one boot loader. If you're willing to support just one boot mode, then the task becomes simpler, but you must ensure that the instructions you follow cover the mode you want to use.
  • Windows access -- Windows treats removable USB flash drives as "superfloppies," which means that it can access only the first partition on the disk. Thus, if you want to use the disk as a Windows backup medium, you must ensure that there's just one Windows-accessible medium and that it be the first one on the disk. All other partitions, including partitions that Windows could never use, must come after this first partition.
Rod Smith
  • 44,284
  • 7
  • 63
  • 105
  • Thank you for your answer @Rod Smith... I just thought that I have a nice idea about my external HD usage and that this would be helpful for other users too... I am going to give a detailed answer if nobody else do it with every step I followed and with details about what can not be done and why. Thanks for your links but I am not looking for am installation on the external HD... just for a persistend live image... I thought it would be useful because I can use my HD on other PCs if needed... but finally I think that it would be much better to carry a usb for such usage – koleygr Jun 18 '17 at 14:57
1

Dialogue

After a dialogue in this chat room, you are deciding how to configure and use your external hard disk drive. It is a good idea to ask and test before deciding and doing things.

I was suggesting that you use mkusb to make the external hard disk drive a persistent live drive (with a big NTFS partition for sharing data with computers running Windows).

Separate drives for storage and live boot

But you found that it is better to separate the function 'storage' and the function 'boot live' (or maybe 'boot persistent live'). An important reason is that you don't like that Windows complains about the partitions, that it does not recognize in the persistent live drive and suggests to format them. You see a potential risk that someone will let Windows damage the external hard disk drive or the data stored in the drive. In general, using the drive only for storage will reduce the risk to damage the data.

  • So the external hard disk drive will be partitioned for storage with a GUID partition table (GPT) and the first partition will be formatted with NTFS for sharing data between Ubuntu and Windows. You may add other partitions to be used by Ubuntu. Edit: A second partition will be formatted with FAT32, which is recognized by 'all' operating systems (including MacOS).

  • You intend to use a USB pendrive for booting a live (or persistent live) system with Ubuntu, probably the community flavour Ubuntu MATE.

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • Thank you for your help! It is almost like what you say... the drive will be a gpt partitioned... the first partition will be an ntfs (for windows Restore) and the second will be a fat32 for general file storage... (I think fat32 is recognized from every OS and it is the default fs for storage)... – koleygr Jun 19 '17 at 08:08
0

It's actually very simple.

  1. I recommend you to shrink atleast 8gb from your internal hard drive for safety sakes.
  2. Burn your ubuntu iso to a usb hard drive.
  3. Insert your external hard drive(make sure it's empty)
  4. Boot from your usb
  5. Go through the install process until you see the choose where to install screen. (you'll see 4 selections)
  6. Click "Custom Install"
  7. Choose your external hard disk and format it by clicking the "-" button and then pressing the "+" button.
  8. Make sure you set your root folder to be / and then install ubuntu onto your external hard disk. (I'm not sure if you need a swap area)
  9. Reboot and in your bios settings change boot order so that your external hard drive will boot first. So if your external hdd is inserted, it'll boot ubuntu and if not inserted, it'll be windows or your other os.
  10. Then, go back to windows, and extend the main drive(because we shrank it at the start)
Jason
  • 3
  • this is not what I am looking for... I didn't ask how can I install ubuntu to an external drive... I am asking about a live ubuntu with persistence that can be used in other PCs too... And not just this! – koleygr Jun 18 '17 at 07:10