LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-14-2012, 12:37 PM   #1
finekevin
LQ Newbie
 
Registered: Jan 2012
Posts: 6

Rep: Reputation: Disabled
Need to identify the USB boot


Hi,

I can boot my system either from SATA drive or USB drive by selecting in BIOS. The question is how do I detect whether I booted from USB or not. Is there any commands? I need this to automate my testing.

Thank you,
Kevin
 
Old 02-14-2012, 01:49 PM   #2
cbtshare
Member
 
Registered: Jul 2009
Posts: 566

Rep: Reputation: 42
If you booted from the USB you will see the usb blinking everytime you move the mouse to issue a command.Thats the simplest way I know of..
 
Old 02-14-2012, 03:27 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 11,597

Rep: Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419Reputation: 1419
mount command may show which is mounted as sda. I'd think that sda would be the booted drive but there are some twists to that story too.
 
Old 02-14-2012, 03:59 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,318

Rep: Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032Reputation: 1032
There is no way to know after the fact.
Maybe pass a dummy parameter to the boot, and check /proc/cmdline.
 
1 members found this post helpful.
Old 02-15-2012, 11:10 AM   #5
gwmorris
LQ Newbie
 
Registered: Sep 2011
Posts: 14
Blog Entries: 1

Rep: Reputation: Disabled
Hello everyone,

I don't want to intrude on the post, but I do have a similar issue I'm wondering about. I have a 500G external drive, mainly for backups, but I split it into two PRIMARY partitions before I wrote anything else to it. One was NTFS, as I had a WinDoze system before and wanted to back it up to its native filesystem. Now I'm wondering what would happen if I installed another Linux system on that drive, would it mess with anything (other than boot options), or could I just use GRUB and set it up there? I want to be able to boot into this installation of Fedora, but I'd like to install a different distro on the BIG drive and be able to boot it without losing any backups.

Actually, I had considered (but only considered) trying to install Win again on the NTFS partition, but again I don't know how that would work or affect the existing system. Anyone with experience doing this, I'd appreciate a little advice or info!

Thanks.
 
Old 02-15-2012, 03:56 PM   #6
MrUmunhum
Member
 
Registered: May 2006
Location: Mt Umunhum, CA, USA
Distribution: Debian/ Fedora
Posts: 418

Rep: Reputation: 33
Quote:
Originally Posted by gwmorris View Post
Hello everyone,

I don't want to intrude on the post, but I do have a similar issue I'm wondering about. I have a 500G external drive, mainly for backups, but I split it into two PRIMARY partitions before I wrote anything else to it. One was NTFS, as I had a WinDoze system before and wanted to back it up to its native filesystem. Now I'm wondering what would happen if I installed another Linux system on that drive, would it mess with anything (other than boot options), or could I just use GRUB and set it up there? I want to be able to boot into this installation of Fedora, but I'd like to install a different distro on the BIG drive and be able to boot it without losing any backups.

Actually, I had considered (but only considered) trying to install Win again on the NTFS partition, but again I don't know how that would work or affect the existing system. Anyone with experience doing this, I'd appreciate a little advice or info!

Thanks.
I'm assuming by 'external drive' you mean a USB drive?

The best way to repartition any drive is to use Gparted. I use a live CD myself but you can use the one that comes with Fedora to alter an external drive.

I would not reinstall Winder$, I don't trust M$ to not wipe out my existing systems!

Yes, Grub is your friend. I have an old 'How To' that is very popular at: http://64.124.13.3/hacks/USB_Boot_using_GRUB.html

Again, get a live CD for Super Grub, it will help you recover from weird things.
 
Old 02-16-2012, 06:42 AM   #7
gwmorris
LQ Newbie
 
Registered: Sep 2011
Posts: 14
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by MrUmunhum View Post
I'm assuming by 'external drive' you mean a USB drive?

The best way to repartition any drive is to use Gparted. I use a live CD myself but you can use the one that comes with Fedora to alter an external drive.

I would not reinstall Winder$, I don't trust M$ to not wipe out my existing systems!

Yes, Grub is your friend. I have an old 'How To' that is very popular at: http://64.124.13.3/hacks/USB_Boot_using_GRUB.html

Again, get a live CD for Super Grub, it will help you recover from weird things.
Yes, USB. I figured that would be assumed due to the nature of the post. The partitioning is already done, as for splitting the drive. I used whatever was there at the time, and I know all about setting up the filesystem for Linux with /boot and /home, etc. and whatever you want to keep separate, so that's no big deal. All I'm wanting to know is if I can install a different distro on the BIG 500G USB (or 250G ext4) drive and be able to boot into it, but not mess with this install or disable it somehow. I've done quite a few multi-boot systems, mixing Win and Linux, Win and VMS, and the like, but never tried this on an external drive like that, nor have I ever tried two Linux distros at the same time. All I want to do is be sure that if I try it there's nothing serious that I need to do or consider. I have WINE, it's just not the greatest for some tasks and difficult to configure. I've even considered seeing if there is a way to run a true Windows as an emulation, but haven't looked into it much yet.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
I can't identify correct USB node Paweł Linux - Embedded & Single-board computer 2 05-09-2011 04:17 PM
How to identify USB card reader device? caerphoto Linux - Software 6 01-28-2011 03:14 AM
identify usb drive timl Red Hat 1 08-07-2009 03:03 AM
How to identify internally connected USB devices madhi Linux - Hardware 4 01-20-2009 02:58 AM
udevinfo - how do I uniquely identify the port a usb is on jjamesis Fedora 4 08-07-2007 08:31 AM


All times are GMT -5. The time now is 01:48 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration