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 02-07-2011, 11:58 PM   #1
sr_25
Member
 
Registered: Nov 2005
Location: Colorado
Posts: 122

Rep: Reputation: 15
Copy mbr of usb flash drive using dd.


I have 2 different usb flash drives. I use both Puppy linux and TRK on a regular basis. Both usb flash drives used to work correctly I had Puppy 5.11 installed on a SanDisk Cruzer mini 512mb usb flash drive, and TRK installed on a Toshiba 8gb usb flash both of these installations worked correctly. But I wanted to swap the installations . So now TRK is currently working on the SanDisk but I can not get Puppy to boot on the 8gb Toshiba drive.

I had a thought that I would just copy the boot sector of the working dive to the usb flash drive but this didn't work. Here is what I did:
Code:
dd if=/dev/sdc of=/mnt/sdb5/MbrUSB.image bs=446 count=1
dd if=/mnt/sdb5/MbrUSB.image of=/dev/sdd1 bs=446 count=1
This however did not work it still will not boot. Does anyone have any idea how I can fix this?
 
Old 02-08-2011, 07:05 AM   #2
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,504

Rep: Reputation: 325Reputation: 325Reputation: 325Reputation: 325
If all else fails, I suppose you could reformat the 8GB drive, install Puppy, then copy your pup_save file to the 8GB drive.
 
Old 02-08-2011, 04:58 PM   #3
Charles4809
LQ Newbie
 
Registered: Dec 2010
Location: Zeist, The Netherlands
Distribution: Mint 9 XFCE, Slitaz, Pinguy
Posts: 12

Rep: Reputation: 1
You did:

Code:

dd if=/dev/sdc of=/mnt/sdb5/MbrUSB.image bs=446 count=1
dd if=/mnt/sdb5/MbrUSB.image of=/dev/sdd1 bs=446 count=1

This means that you copied content of the MBR of sdc to the first partition of sdd

instead of copying to sdd1 you should have copied to sdd (without the partitionnumber)

It is possible that you have corrupted data on sdd1 by now!
 
Old 02-09-2011, 05:16 AM   #4
sumeet inani
Member
 
Registered: Oct 2008
Posts: 895
Blog Entries: 26

Rep: Reputation: 48
CORRECTION
MBR is of 512 bytes .
Boot code at beginning is 446 bytes followed by 64 byte partition table & 2 byte signature.

You are right , Charles4809 .
446 bytes have been written in beginning of first partition because /dev/sd#n means then nth partition of device number # , where # & n are numbers starting from 0 & 1 respectively.

Last edited by sumeet inani; 02-09-2011 at 05:27 AM.
 
Old 02-22-2011, 09:16 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,949

Rep: Reputation: Disabled
There is also http://unetbootin.sourceforge.net/
 
  


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
Which program can boot a copy of the MBR (fake MBR) using mbr.bin Xeratul Linux - Software 6 12-04-2010 12:40 AM
removing grub from MBR of a flash drive dasy2k1 Linux - General 3 11-29-2009 10:19 PM
MBR Problem: Ubuntu installed to a FLASH DRIVE Conservatives_Suck Linux - Laptop and Netbook 3 08-07-2008 10:21 PM
installing the boatloader on a flash drive instead of mbr safrout Linux - General 9 05-14-2007 07:15 PM
low level copy an USB flash drive / memory stick mr.v. Linux - Software 1 02-26-2007 05:05 PM


All times are GMT -5. The time now is 08:47 PM.

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