HOMEPAGE FORUMS NEWS DOCUMENTATION SCREENSHOTS
SystemRescueCd forums
View unanswered posts | View active topics It is currently 22 Dec 2014, 08:24



Post new topic Reply to topic  [ 15 posts ] 
 [DONE] Modify USB Howto 
Author Message

Joined: 15 Nov 2008, 00:54
Posts: 19
Post [DONE] Modify USB Howto
Hi,

I think it would be great to add this in the beginning of the USB Howto

Quote:
sudo cfdisk /dev/sdb (select type LBA FAT32 may be 0B or 0C, make it bootable )
mkfs.vfat -F 32 -n SYSRESC /dev/sdb1
sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb
sudo sync


this explain how to start from scratch with an usb stick ...


Last edited by jadjay on 17 Nov 2008, 21:00, edited 1 time in total.



17 Nov 2008, 12:58
Profile
Site Admin

Joined: 17 Jul 2003, 09:44
Posts: 2700
Post 
I will be glad to improve the documentation. But these commands are a bit strange:

You format /dev/sdb1 first, and then you overwrite the partition table...

Since sdb1 depends on the partition table, maybe we should use dd first ?

Doyou know if the kernel is refreshing its partitions after you run dd ?


17 Nov 2008, 13:22
Profile

Joined: 15 Nov 2008, 00:54
Posts: 19
Post 
I can assure you this works great,

It's the only way i could get sysrec usb working

You need to put the mbr in /dev/sdb and the partition table stay


Well try it and then tell me

Maybe yoiu should use this before the other command

dd if=/dev/zero of=/dev/sdb


17 Nov 2008, 14:16
Profile
Site Admin

Joined: 17 Jul 2003, 09:44
Posts: 2700
Post 
Yes, it may work for you, but I just want to be sure that the instructions will be okay for all the users.


17 Nov 2008, 14:55
Profile

Joined: 15 Nov 2008, 00:54
Posts: 19
Post 
Ok so give it a try with your usb key and told me your results, those commands won't hurt your system or your stick.

In fact :

As root
Quote:
if=/dev/zero of=/dev/sdb

This will erase all in the stick, and bring us a brand new clear stick

As root
Quote:
cfdisk /dev/sdb (select type LBA FAT32 may be 0B or 0C, make it bootable )

This will create *ONLY* the partition table with one LBA FAT32 bootable primary partition

As root
Quote:
mkfs.vfat -F 32 -n SYSRESC /dev/sdb1

This will create the FileSystem FAT32 in the first partirtion

As root
Quote:
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb

This will add the mbr to the top of your stick

As root
Quote:
sync

Synchronize the drive

Please explain me where you find I'm wrong ...

Regards,


17 Nov 2008, 15:40
Profile
Site Admin

Joined: 17 Jul 2003, 09:44
Posts: 2700
Post 
It just looks strange to format the partition first and then to replace the MBR (which contains the partition table). In case your MBR has a different partition table, then the /dev/sda1 you have formatted may be at another location on the disk, so it will be invalid. Of course it may work when the partition table does not change. But I have not investigated further, that's just my opinion.


17 Nov 2008, 20:11
Profile

Joined: 15 Nov 2008, 00:54
Posts: 19
Post 
I'm not sure the partition table is in the mbr...


17 Nov 2008, 20:24
Profile

Joined: 15 Nov 2008, 00:54
Posts: 19
Post 
Ok i got it

if you go to this page
http://en.wikipedia.org/wiki/Master_boot_record

You will see that Code area take the 440 first bit, and the table partition begin at the 446th or 447th bytes,

So if i do
Code:
dd if=/dev/zero of=/dev/sdb bs=1 count=439


I didn't touch the partition table ( I tried )

If you make :
Code:
ls -l /usr/lib/syslinux/mbr.bin

You will see that mbr.bin is just 404 bytes long so it won't touch the partition table...


I agree you to put this explication in the Howto :)


17 Nov 2008, 20:36
Profile
Site Admin

Joined: 17 Jul 2003, 09:44
Posts: 2700
Post 
Ok, It's better now. I will put that on the handbook immediately. Thanks a lot for that contrib.


17 Nov 2008, 20:38
Profile

Joined: 15 Nov 2008, 00:54
Posts: 19
Post 
You're welcome!

I thank you so much for your questions and your doubt, i learn a lot with that!!!


17 Nov 2008, 20:59
Profile

Joined: 24 Oct 2008, 13:39
Posts: 59
Post 
If you'd like an addition to the "known to work" USB drive list:

I have a 2GB ( 4013710 512-byte hardware sectors) Cruzer Titanium (SanDisk U3 Titanium 3.27 PQ: 0 ANSI: 2) that works great following the manual's guide here:

http://www.sysresccd.org/Sysresccd-manu ... _USB-stick

(on Dec 1st, 08)


12 Dec 2008, 21:19
Profile WWW
Site Admin

Joined: 17 Jul 2003, 09:44
Posts: 2700
Post 
Page updated thx


12 Dec 2008, 21:41
Profile

Joined: 26 Aug 2008, 08:25
Posts: 2
Post Re: [DONE] Modify USB Howto
jadjay wrote:
Hi,

I think it would be great to add this in the beginning of the USB Howto

Quote:
sudo cfdisk /dev/sdb (select type LBA FAT32 may be 0B or 0C, make it bootable )
mkfs.vfat -F 32 -n SYSRESC /dev/sdb1
sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdb
sudo sync


this explain how to start from scratch with an usb stick ...


First of all, thanks for your guide, it helped me making my USB-stick boot. Secondly, I could'nt find /usr/lib/syslinux/mbr.bin. when I booted Sysrscd but I found it in /usr/share/syslinux/mbr.bin. Maybe it's because I am using a newer version of Sysrscd.

Dolmio


11 Aug 2009, 14:20
Profile
Site Admin

Joined: 17 Jul 2003, 09:44
Posts: 2700
Post 
So the new file must be the right one, I will update the manual. Thanks


13 Aug 2009, 19:44
Profile

Joined: 01 Dec 2010, 08:07
Posts: 3
Post Re:
admin wrote:
So the new file must be the right one, I will update the manual. Thanks


Yes you are right we also do it manual.


01 Dec 2010, 08:20
Profile WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 


Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.