LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 09-24-2012, 09:57 PM   #1
Jamf
LQ Newbie
 
Registered: Sep 2012
Location: cyberspace
Distribution: Cent, Fedora
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 09-24-2012, 11:36 PM   #2
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
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.
 
Old 09-25-2012, 10:17 AM   #3
snowday
Senior Member
 
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Install the bootloader to the thumb drive (/dev/sdb) *not* your hard drive (/dev/sda) and you should be okay.
 
Old 09-26-2012, 05:33 PM   #4
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
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: Reputation: 157Reputation: 157
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...
 
Old 09-26-2012, 07:41 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
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.
 
Old 09-27-2012, 08:27 AM   #6
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
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: Reputation: 157Reputation: 157
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).
 
Old 09-27-2012, 08:50 PM   #7
tux9656
LQ Newbie
 
Registered: Sep 2012
Distribution: Debian
Posts: 11

Rep: Reputation: Disabled
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.
 
Old 10-04-2012, 12:02 PM   #8
Jamf
LQ Newbie
 
Registered: Sep 2012
Location: cyberspace
Distribution: Cent, Fedora
Posts: 4

Original Poster
Rep: Reputation: Disabled
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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Install Linux to SATA drive but GRUB2 on to USB thumb drive Quija Linux - General 2 11-22-2011 06:40 PM
Need help creating Acer Aspire One bootable USB thumb drive tkilbride Linux - Laptop and Netbook 22 04-03-2011 09:52 AM
How to get Drive letter and serial number of thumb drive in linux? manucng Linux - Newbie 3 02-05-2010 02:25 AM
Linux in thumb drive sarah1 Linux - Newbie 7 05-02-2008 12:23 PM
creating a bootable usb thumb drive tlarkin Linux - Software 13 02-21-2006 06:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 10:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration