- Saved searches
- Use saved searches to filter your results more quickly
- S4mJ/Creating-a-bootable-linux-ssd-hdd
- Name already in use
- Sign In Required
- Launching GitHub Desktop
- Launching GitHub Desktop
- Launching Xcode
- Launching Visual Studio Code
- Latest commit
- Git stats
- Files
- README.md
- How to boot from SSD but have installations and home folder on HDD
- 2 Answers 2
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Guide to create a bootable ssd/hdd with linux
S4mJ/Creating-a-bootable-linux-ssd-hdd
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
README.md
This guide was created to help anyone who wants to create a bootable ssd or hdd with linux that is usable on any computer. I spent a long time researching how to do this as well as fixes for problems I encountered and this will walk you through the entire process. This guide uses the ubuntu operating system so commands may vary for other operating systems. This guide will also make the drive compatable with Apple computers.
This is the first step to making the bootable drive and requires you to have both the ssd/hdd you would like to use as well as a usb to save the ubuntu ISO to. Download the Ubuntu ISO to your system from https://ubuntu.com/download/desktop. It is ok to get the older version at this stage as it will be updated later anyway.
- Insert both the usb and ssd into your ssd and open a terminal to execute the following commands.
- These commands are for macOS specifically so you will need to look online for windows equivalents.
diskutil list diskutil eraseDisk FAT32 UBUNTU /dev/ diskutil unmountDisk /dev/
Setting up the partitions
This step will walk you through the process of installing linux onto the main ssd/hdd and setting up the partitions.
- Power on your machine and repeatedly press the f12 button(could be another button depending on your motherboard manufacturer) until you come to a set of options in a boot menu.
- You want to click the option that is for your USB. Look for a line names UEFI and double click it.
- When a ubuntu menu appears click the first option to test out ubuntu first.
- When you load in you should see a desktop with a series of applications on the left. Look for one called install Ubuntu and click it.
- You need to go through this process up until you get to a page that will ask you what you want to install. Use the top option that is the reccommended install and you may optionally select any other options below it.
- When you press continue after this there will be a short wait and you should then be brought to a menu regarding where you would like to install Ubuntu to. Make sure to only select the option at the bottom called «Something Else».
- When you get to the next page you should see a series of drives most likely titled sda, sdb, sdc and so on. Find the one that is corresponding to your ssd/hdd and click it and then click create new partition.
- You should be left with one unallocated of the size of your ssd.
- Click this and press the small + sign at the bottom left to create your first partition.
- The first partition you want to make is the swap partition. Set the size of the partition to be equal to the amount of ram your computer has.
- Select the bottom two options of each section and finally select the partition format to swap area and then save.
- The second partition you want to make is the main storage. Click the + again and leave all the settings as is except for the format which should be set to ext4 and the directory to /.
- You then need to go to the bottom of that window and where you see a drop down menu of drives, select the USB that has the Ubuntu ISO loaded on. Then click install.
- Continue on through these options untill you finish the installation and are instructed to reboot the system. When this happens again select the USB as the option to boot from and select the test ubuntu first option.
At this stage you have a functioning bootable ssd/hdd however at the moment you are only going to be able to use it on the system you created it on. This needs to be fixed.
- Start by opening the terminal and running sudo fdisk -l to get a list of partitions.
- Identify the one that has the linux partitions. In my case this is /dev/sdb. For the purposes of this guide we will call that /dev/sdX.
- You also need to identify the partition that contains the root filesystem. In my case this is /dev/sdb2. We will refer to it as /dev/sdXY from now on.
- Launch GParted from the terminal with sudo gparted /dev/sdX
- From here you need to resize your main root partition to allow for 200mb more space elsewhere. Right click the root partition and select unmount. From there right click it again and click resize. Where you see the large number representing your size ssubtract 200 away from that number and click save. When you do this you should then see another new partition below it which is exactly 200mb in size. Createa new partition in that space and change the file system to fat32. Then click the apply operations button at the top of the window. After this applies, right click the new partition you just made and click manage flags. Set the flags to boot and esp. From now on I will refer to this partition /dev/sdXZ.
- We now have a dedicated partition for the ESP however we need to make sure the ubuntu installation on the ssd/hdd can see it.
- Launch Gparted from the terminal with sudo gparted /dev/sdX
- Double click the linux root filesystem and write down the UUID so you can refer to it later.
- Double click the new fat32 partition you just made and note down its UUID as well. This UUID should be much shorter than the previous one.
- Close gparted and reopen the terminal.
- Run the following commands
sudo umount /media/ubuntu/ sudo mount /dev/sdXY /mnt sudo nano /mnt/etc/fstab
UUID= /boot/efi vfat defaults 0 1
sudo mount /dev/sdXZ /mnt/boot/efi for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt/$i; done sudo cp /etc/resolv.conf /mnt/etc/ modprobe efivars sudo chroot /mnt grub-install -d /usr/lib/grub/x86_64-efi --efi-directory=/boot/efi --removable /dev/sdX
Even though the ssd/hdd will boot on any system, it will not yet be compatable with an apple computer. The solution to this is to update ubuntu to the latest version which will improve the system both from the updates and if you happen to be an apple user by allowing you to use it on an apple computer. Only do this if you are ok with not using the LTS version of linux or you want to use a apple computer.
The current version of ubuntu will be 18.04. We first need to upgrade this to 19.04 then finally to 19.10.
- Start by running the following commands
sudo apt update && sudo apt dist-upgrade sudo apt install update-manager-core sudo nano /etc/update-manager/release-upgrades
You should now have a fully bootable version of linux usable on any system.
How to boot from SSD but have installations and home folder on HDD
I have an SSD I want to boot from it, but use the HDD to store installed programs and keep the home folder. I’m running Linux Fedora 19. How do I set that up?
Do you really just want to boot from it (i.e. have boot sector, kernel image and possibly initrd there) or do you also want to have there some system files which are used during the OS operation? Which files?
2 Answers 2
During installation you will be asked which disk to use and which partitions to mount. Reading you question I think you want this:
[SSD] /boot / SWAP [HDD] /usr /tmp /home
- /boot from the SSD (not much here, /boot is only a very small filesystem needed to start and optionally to decrypt a volume.
- / on the SSD since you will be accessing it quite often en thus gain a large speed gain. / (the root filesystem) is usually quite small and it is here where you usually have the mount points for other filesystems such as /usr, /usr/local, /opt, /var, /lib etc. Some of these you want to keep on /, such as var and lib. Others such as /usr/, /usr/local/ and /home are best mounted from another partition.
- SWAP since paging depends a lot on the disk speed. Thus is gains the most from the SSD. And with modern SSD there is no reason not to do this. A modern SSD (read: any SSD manufactured in the last decade) can sustain heavy writes for years. Your computer will be old and discarded before you reach this limit).
- /usr on the HDD since you ask to use the HDD for the programs. Most of these are stored in /usr (OS/distribution provided) or in /usr/local (self installed).
- /home for the same reason.
- /tmp is a choice. If you have sufficient memory then /tmp in RAM makes a lot of sense. If you use it to also store temporary ISOs etc then using a partition makes more sense.
/boot: not much. /: depends on how many other things you use, but I would go up to 10-20GB (I have used /’s of 16MB in the past with /var, /var/spool/mail/, /tmp and /usr on other disks. But disk space is relative cheap these days so a simple large / might do well. Swap: Not much. 512MB should do unless you have little RAM and start compiling Qt. /tmp: 1GB-ish. /home: your choice. /usr: the rest. — Mind you, all of this is my opinion. There are many ways to size partitions and all have their advantages and disadvantages. E.g. a single large root is easy, but inflexible. Etc etc.