LinuxQuestions.org
Register a domain and help support LQ
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 04-16-2007, 08:02 PM   #1
dbough
LQ Newbie
 
Registered: Sep 2006
Distribution: Various - getting my feet wet!
Posts: 19

Rep: Reputation: 0
Saving a file to a USB thumb drive from the command line


Quick and dirty:

Installed CentOS on an IDE HD on a PC where Windows is installed on a SATA. I put grub on the primary partition of the IDE and want to point the windows bootloader to it.

i've 'dd if=/dev/hdb1 of=/bootsect.lnx bs512 count=1' to get bootsect.lnx to the root directory of the linux drive. I now need to get that file onto a thumb drive.

I can't find the mount point for the drive. I have no idea what its called and have looked everywhere I can think of to find it.

If I run 'rmesg | tail' after pluging it in i get "usb 1-4: new high speed usb device using address 4" so its definatly recognized.

Any ideas on where to dig for this thing? I just need to copy the boot file and I'm all set.

Thanks!
 
Old 04-16-2007, 08:15 PM   #2
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Issue
Code:
/sbin/fdisk -l
You should have something like /dev/sda1 in the list. Once you find it, mount it wherever you wish.
Good luck.
 
Old 04-16-2007, 08:59 PM   #3
dbough
LQ Newbie
 
Registered: Sep 2006
Distribution: Various - getting my feet wet!
Posts: 19

Original Poster
Rep: Reputation: 0
Peace - Thanks for the quick reply!

For whatever reason the only partitinos listed are:

/dev/hdb1 (which is /boot)
/dev/hdb2 (which is /)
/dev/hdb3 (swap file)

Nothing else is listed (neither of my SATA drives or the USB Drive.)

I'm running at the linux rescue command prompt. Would this effect anything?

I'm really at a loss here.

Would using a Live distro of linux help me get the file onto a thumb drive? This may be my next course of action.

Thanks!

D
 
Old 04-16-2007, 10:24 PM   #4
dbough
LQ Newbie
 
Registered: Sep 2006
Distribution: Various - getting my feet wet!
Posts: 19

Original Poster
Rep: Reputation: 0
To update things tried:

Booted to Knoppix 5.x DVD. Copied bootsect.lnx from the hdb1 partition to a thumb drive. Opened the thumb drive in Windows XP - the file was nowhere to be found.

After some more digging I found a program called 'bootpart.' Ran that, it seemed to run ok, but it failed to add a line to my boot.ini file (so I did it manually.) When I select linux from the OS choices, it quickly flashes the bootpart information and then kicks back to the OS selection screen.

I really don't know what is going on. It definatly should not be this difficult. I'm really hoping someone out there has had a similar issue and can point me (or let me know what I'm trying to do is impossible) in the right direction.

I just can't get over the fact that when going into the linux rescue prompt the only partions it sees are /dev/hda1,2,3. I might as well let Grub take over the MBR at this rate. /sigh
 
Old 04-17-2007, 07:34 PM   #5
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
You may find some useful info here.

http://www.centos.org/docs/5/html/In...mode-boot.html

Good luck. ;-)
 
Old 04-17-2007, 07:59 PM   #6
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
I quickly googled something else that may help you.

http://users.bigpond.net.au/hermanzo...SB_thumb_drive.

Good luck. ;-)
 
Old 04-17-2007, 08:07 PM   #7
dbough
LQ Newbie
 
Registered: Sep 2006
Distribution: Various - getting my feet wet!
Posts: 19

Original Poster
Rep: Reputation: 0
Peace,

Thanks again for the response. I've actually reinstalled CentOS 3 times now. On the third attempt I told Grub to install on the MBR.

Alas I think I have found the issue. My two SATA drives (one of which has Windows and the MBR) are not recognized for some reason. If they are recognized I can't seem to find them anywhere.

After I go into linux rescue mode, and get to the proper command prompt (chroot /mnt/sysimage ...) I've tried multiple things. Under the /dev directory I have various misc devices that aren't even avaialbe on my PC. The only valid entry is hdb which is the PATA drive that linux is installed on.

If I type "/sbin/fdisk -l" I get the partitions listed in a previous post.

There is absolutely nothing special about this installation - thats what's baffling. Is there a way to know for sure whether or not I can see the serial drives from the IDE drive in linux rescue mode? Have I already determined that they aren't able to be seen by typing /sbin/fdisk -l? Do I need to mount them? (I would if I could even find them.)

I can't believe how frustrating this is. I've never had an issue installing a linux distro on a seperate hard drive while using a SATA as my primary/windows drive.
 
Old 04-17-2007, 08:21 PM   #8
Peacedog
LQ Guru
 
Registered: Sep 2003
Location: Danville, VA
Distribution: Slackware, Windows, FreeBSD, OpenBSD, Mac OS X
Posts: 5,296

Rep: Reputation: 168Reputation: 168
Here is a rather lengthy article on a very similar situation. Hope this helps.

http://danleff.net/myarticles/fedora...arddrives.html

Good luck. ;-)
 
  


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
Using a usb thumb drive or flash drive as a swap partition. stevenjoseph Linux - Hardware 8 01-16-2012 01:09 PM
help saving files and moving with thumb drive bullet_hole Linux - General 1 01-21-2006 10:29 PM
USB drive using different partitions (usb key thumb drive) Arodef Linux - Hardware 0 08-04-2004 07:36 PM
USB thumb drive works great, but I still can't get my USB mouse to work. blk96gt Slackware 8 06-22-2004 02:52 AM
Copy A File Off A CD To The Hard Drive In Command Line nickae77 Linux - Newbie 4 05-21-2004 05:38 AM


All times are GMT -5. The time now is 08:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration