Creating linux filesystem on a thumb drive to be used as secondary OS
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Creating linux filesystem on a thumb drive to be used as secondary OS
Maybe I'm still a noob but I feel like this project should be doable. I have been trying to setup a lab environment to study for my RHCSA but I would like to avoid writing to my SSD. My setup is 128GB SSD (1) 500GB internal Sata HD (1) 8GB thumb drive (1). Since this is also my gaming station I want to keep my windows install which consumes all space on my SSD. The extra HD can be used if necessary but here is what I am TRYING to do. I want to install Cent onto the thumb drive so that I can boot into windows without using the thumb drive, but when I want to use a lab environment I can simply boot the machine with the thumb drive and then boot from that instead of my local disk.
My first attempt at this project was met with mild success. It was using Fedora and it did everything I wanted to BUT it would only boot with the thumb drive plugged in, and the weird part is I would have to boot from HD in the boot device menu. Logically I assume that GRUB had installed stage 2 to the thumb drive and would not provide the standard GRUB boot selection menu without the drive available.
This time around I am trying to use Cent and based on my previous failure I assume that I want to "install bootloader" to /dev/sda and the filesystem itself to /dev/sdd (thumb drive). I have been thus far unsuccessful. In the end I would like to be able to use my extra HD for for disk space on VMs that I will be making.
My question(s) are is this possible? To what extend can I keep everything linux contained on the thumb drive while still maintaining the flexibility of using my PC without it? Am I missing something?
What I am NOT trying to do is just make a "live USB" stick, or create a situation such as I had before in which the USB stick was required to start the computer.
Well you could put everything on the thumb drive and then use the bios boot menu to select what device you would like to boot from. This way you do not have to install grub to the internal drive and it keeps windows happy without having to do any odd configurations ( like make a boot partition )
In this case you would install grub to /dev/<thumb drive> instead of /dev/sda
Most bios you can select what to boot by hitting f11 at start-up. Or you could go into the bios and set the USB as first boot device, that way when you boot without it it will move onto the next boot device such as the internal drive.
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802
Rep:
That seems like an awful lot of trouble to set up a Linux environment to study for the RHCSA, which is a $400 exam, when a lab machine probably wouldn't cost you more than $450, in and of itself... Less if you bought it used...
I rededicated a Toshiba laptop with a hardware VM capable i3, running Scientific Linux 6.3 to be my lab machine...
For the most part modern linux systems and common newish computers see a usb flash drive as a real hard drive. I tend to use the computers bios to move the hard drive order so that the usb drive is now the first in boot order above the installed hard drives. This way I keep unique boot issues always on the drive I want to boot. I never edit my main hard drive grub to boot, just bios.
In all of this you have to know what the installer is saying to you. Be sure not to mess up your windows data.
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802
Rep:
Some (most I've seen, lately) BIOSs don't give you more than one bootable HD at a time,... So your choices are; HD (choice of 1 through n), CD/DVD drive (either internal or USB, but as with HD, not usually both), PXE, and maybe one other (SD card?!?!)...
Again, to me, it just seems like an awful lot of hoop jumping to go through for something that ought to be important enough (a potentially career opportunity producing Cert.) to warrant its own dedicated hardware,... just my humble opinion...
Plus, dedicating a machine gives you an at-home test bed for work related issues,... So you're not trying things out on production servers (and maybe getting yourself fired in the process).
Parted/GParted can shrink your Windows ntfs filesystem and give you free, unpartitioned space at the end of your ssd. You could then install CentOS there.
Thank you for all your suggestions, I ended up going with snowpines suggestion and it worked like a charm. The biggest problem was that it was slow so I decided to carve out about 10GB of my extra HDD. It ended up being just as well bcause now I dont even need the thumb drive, and because the bootloader is not on the SSD it still boots "normallly" without any interaction. Thanks for all the suggestions guys!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.