| Author |
Message |
|
jadjay
Joined: 15 Nov 2008, 00:54 Posts: 19
|
 [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 |
|
 |
|
admin
Site Admin
Joined: 17 Jul 2003, 09:44 Posts: 2693
|
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 |
|
 |
|
jadjay
Joined: 15 Nov 2008, 00:54 Posts: 19
|
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 |
|
 |
|
admin
Site Admin
Joined: 17 Jul 2003, 09:44 Posts: 2693
|
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 |
|
 |
|
jadjay
Joined: 15 Nov 2008, 00:54 Posts: 19
|
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
Synchronize the drive
Please explain me where you find I'm wrong ...
Regards,
|
| 17 Nov 2008, 15:40 |
|
 |
|
admin
Site Admin
Joined: 17 Jul 2003, 09:44 Posts: 2693
|
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 |
|
 |
|
jadjay
Joined: 15 Nov 2008, 00:54 Posts: 19
|
I'm not sure the partition table is in the mbr...
|
| 17 Nov 2008, 20:24 |
|
 |
|
jadjay
Joined: 15 Nov 2008, 00:54 Posts: 19
|
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 |
|
 |
|
admin
Site Admin
Joined: 17 Jul 2003, 09:44 Posts: 2693
|
Ok, It's better now. I will put that on the handbook immediately. Thanks a lot for that contrib.
|
| 17 Nov 2008, 20:38 |
|
 |
|
jadjay
Joined: 15 Nov 2008, 00:54 Posts: 19
|
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 |
|
 |
|
n8bounds
Joined: 24 Oct 2008, 13:39 Posts: 59
|
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 |
|
 |
|
admin
Site Admin
Joined: 17 Jul 2003, 09:44 Posts: 2693
|
Page updated thx
|
| 12 Dec 2008, 21:41 |
|
 |
|
Dolmio
Joined: 26 Aug 2008, 08:25 Posts: 2
|
 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 |
|
 |
|
admin
Site Admin
Joined: 17 Jul 2003, 09:44 Posts: 2693
|
So the new file must be the right one, I will update the manual. Thanks
|
| 13 Aug 2009, 19:44 |
|
 |
|
offsitenoc
Joined: 01 Dec 2010, 08:07 Posts: 3
|
 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 |
|
 |
|