Making bootable USB keys

Samuel Martín Moro faust64 at gmail.com
Fri Sep 4 10:13:50 UTC 2009


Hello

So, for the hexdump problem (files that begin differently), I found that
status=noxfer isn't a correct dd option on FreeBSD... (yeah, and writting
scripts with `>/dev/null 2>&1' isn't such a good idea...)

I tested back, it failed again.
I used a generated stick (by our FreeBSD script) to compare with mine.

da0 (mine) / da1 (good)
da0s2 and da1s2 are (nearly) the same for 8192b (the start of daXs2a)
then, da0s2a is:
00001e80  00 00 00 04 00 ff ff ff  ff 2f 7c 5c 2d 00 00 00
|........./|\-...|
00001e90  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
|................|
*
00002000  00 00 00 00 00 00 00 00  20 00 00 00 30 00 00 00  |........
...0...|
00002010  38 00 00 00 48 00 00 00  00 00 00 00 ff ff ff ff
|8...H...........|
00002020  b9 db a0 4a 58 af 11 00  7e a8 11 00 2b 00 00 00
|...JX...~...+...|

and da1s2a is:
00001e80  00 00 00 04 00 ff ff ff  ff 2f 7c 5c 2d 00 00 00
|........./|\-...|
00001e90  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
|................|
*
00002000  72 32 45 69 a2 45 71 4b  d3 2c f5 2e e9 82 28 cd
|r2Ei.EqK.,....(.|
00002010  b6 d4 02 b1 e2 34 51 36  76 c5 b5 22 4a 0e 4b aa
|.....4Q6v.."J.K.|
00002020  b5 54 71 3e a5 c7 36 8a  52 b9 77 a9 18 6c f3 e9
|.Tq>..6.R.w..l..|

I searched into my generated file, there's no "r2Ei".

I'll post updates.
(But if you can help ... ^^)


Thanks!

Samuel Martín Moro
CamTrace
{EPITECH.} tek4



On Fri, Sep 4, 2009 at 9:51 AM, Samuel Martín Moro <faust64 at gmail.com>wrote:

> In fact, we provide the servers and the keys.
> So we're sure everything will work.
>
> And also, our install CD is already able to create this kind of USB stick.
> It was a former co-worker who did it.
> I started mine looking its. But most of used commands haven't exact
> equivalent under linux (and I fucking hate sfdisk and counting in
> cylinders!)
>
> Here's an example of a generated stick:
> h2g2:~# fdisk da0
> ******* Working on device /dev/da0 *******
> parameters extracted from in-core disklabel are:
> cylinders=493 heads=255 sectors/track=63 (16065 blks/cyl)
>
> parameters to be used for BIOS calculations are:
> cylinders=493 heads=255 sectors/track=63 (16065 blks/cyl)
>
> Media sector size is 512
> Warning: BIOS sector numbering starts with sector 1
> Information from DOS bootblock is:
> The data for partition 1 is:
> sysid 11 (0x0b),(DOS or Windows 95 with 32 bit FAT)
>     start 63, size 6602652 (3223 Meg), flag 0
>         beg: cyl 0/ head 1/ sector 1;
>         end: cyl 410/ head 254/ sector 63
> The data for partition 2 is:
> sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
>     start 6602715, size 1317330 (643 Meg), flag 80 (active)
>         beg: cyl 411/ head 0/ sector 1;
>         end: cyl 492/ head 254/ sector 63
> The data for partition 3 is:
> <UNUSED>
> The data for partition 4 is:
> <UNUSED>
> h2g2:~#
>
>
>
> Samuel Martín Moro
> CamTrace
> {EPITECH.} tek4
>
>
>
> On Fri, Sep 4, 2009 at 6:31 AM, Fbsd1 <fbsd1 at a1poweruser.com> wrote:
>
>> Samuel Martín Moro wrote:
>>
>>> Hello
>>>
>>> I'm having some troubles, trying to create bootable USB keys.
>>> I found (freebsd-hackers ML archives) a script, supposed to create the
>>> bootable image from my iso file.
>>> But, it still don't boot... (I may do it wrong)
>>>
>>> In details:
>>> -We distribute a FreeBSD (4.7, 5.4, 6.2 and 7.2) "custom" server.
>>> -We burn our install CD (and, in a few, our USB sticks) on a Ferdora 9
>>> (sorry...)
>>> -USB sticks must contain a FAT32 partition (we'ld like to provide doc for
>>> windows users)
>>>
>>> Well, my english isn't so great... so I'll post my code (more
>>> understandable)
>>>
>>>
>> clip ----
>>
>> I have same problem with getting a usb stick to boot. After much testing
>> with different sticks and PC combinations have come to this conclusion.
>>
>> When usb hardware first can out they were created for usb 1.0 standard and
>> at that same period PC's where using software drivers for usb support and
>> the PC's bio's boot selection did not include option to boot from usb disk.
>> As usb devices became more popular PC manufactures started adding USB
>> firmware to their motherboards for usb 2.0 standard. From my research into
>> usb 2.0 it only supports data recording and does not support booting
>> function. About 2007 usb 2.2 standard came out and it supports an usb memory
>> stick as bootable. In 2008 some manufactures of motherboards added usb 2.2
>> standard to their motherboards and bio's selection to boot from memory
>> stick.
>>
>> To be bootable the first file on the the stick has to be the boot image.
>>  Haveing a ms fat partition first on the stick will never work unless you
>> fill it with an bootable ms/windows or ms/dos system or the same kind of
>> setup found on the cdrom1 release cd.
>>
>> Only usb 2.2 memory sticks are bootable on newer PC's that have usb 2.2
>> firmware on their motherboards and matching Bio's with selection for booting
>> from usb 2.2 memory sticks. Please note that bio's booting selection for
>> booting from USB disk is different than booting selection for booting from
>> usb memory stick. I have posted many posts on this list about this subject
>> and have not received any posts contrary to the above statement.
>>
>> The pending 8.0 release has a complete rewrite of the USB code and a new
>>  stick.img is being generated as part of the release install distribution's.
>> I can dd the 8.0-stick.img file to an 2.0 stick and it never boots, but do
>> the same thing to a 2.2 stick and it boots on all 3 of my PC manufactured
>> since June 2008.
>>
>> Final Conclusion: Booting from a USB memory stick successfully is totally
>> dependent on using new start-of-the-art hardware.
>>
>>
>>
>>
>>
>>
>>
>>
>


More information about the freebsd-questions mailing list