[DONE] Modify USB Howto

Post there if you plan to contribute to this SystemCd
jadjay
Posts: 19
Joined: 15 Nov 2008, 00:54

[DONE] Modify USB Howto

Postby jadjay » 17 Nov 2008, 12:58

Hi,

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

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.

admin
Site Admin
Posts: 2707
Joined: 17 Jul 2003, 09:44

Postby admin » 17 Nov 2008, 13:22

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 ?

jadjay
Posts: 19
Joined: 15 Nov 2008, 00:54

Postby jadjay » 17 Nov 2008, 14:16

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

admin
Site Admin
Posts: 2707
Joined: 17 Jul 2003, 09:44

Postby admin » 17 Nov 2008, 14:55

Yes, it may work for you, but I just want to be sure that the instructions will be okay for all the users.

jadjay
Posts: 19
Joined: 15 Nov 2008, 00:54

Postby jadjay » 17 Nov 2008, 15:40

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
if=/dev/zero of=/dev/sdb

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

As root
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
mkfs.vfat -F 32 -n SYSRESC /dev/sdb1

This will create the FileSystem FAT32 in the first partirtion

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

This will add the mbr to the top of your stick

As root
sync

Synchronize the drive

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

Regards,

admin
Site Admin
Posts: 2707
Joined: 17 Jul 2003, 09:44

Postby admin » 17 Nov 2008, 20:11

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.

jadjay
Posts: 19
Joined: 15 Nov 2008, 00:54

Postby jadjay » 17 Nov 2008, 20:24

I'm not sure the partition table is in the mbr...

jadjay
Posts: 19
Joined: 15 Nov 2008, 00:54

Postby jadjay » 17 Nov 2008, 20:36

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: Select all

dd if=/dev/zero of=/dev/sdb bs=1 count=439


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

If you make :

Code: Select all

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 :)

admin
Site Admin
Posts: 2707
Joined: 17 Jul 2003, 09:44

Postby admin » 17 Nov 2008, 20:38

Ok, It's better now. I will put that on the handbook immediately. Thanks a lot for that contrib.

jadjay
Posts: 19
Joined: 15 Nov 2008, 00:54

Postby jadjay » 17 Nov 2008, 20:59

You're welcome!

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

n8bounds
Posts: 59
Joined: 24 Oct 2008, 13:39
Contact:

Postby n8bounds » 12 Dec 2008, 21:19

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)

admin
Site Admin
Posts: 2707
Joined: 17 Jul 2003, 09:44

Postby admin » 12 Dec 2008, 21:41

Page updated thx

Dolmio
Posts: 2
Joined: 26 Aug 2008, 08:25

Re: [DONE] Modify USB Howto

Postby Dolmio » 11 Aug 2009, 14:20

jadjay wrote:Hi,

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

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

admin
Site Admin
Posts: 2707
Joined: 17 Jul 2003, 09:44

Postby admin » 13 Aug 2009, 19:44

So the new file must be the right one, I will update the manual. Thanks

offsitenoc
Posts: 3
Joined: 01 Dec 2010, 08:07
Contact:

Re:

Postby offsitenoc » 01 Dec 2010, 08:20

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.


Return to “Contributions”

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests