DD Tool (Preserve Patition Information[Floppy/USB])
DD Tool (Preserve Patition Information[Floppy/USB])
if I am using the DD tool, how exactly would I preserve the partition information on a floppy disk ... on a USB flash-drive. I do use Bochs as my current emulator for testing, but sometimes I really would like to boot on an actual machine using the machine's BIOS and such. All help would be appreciated, step, by step or just a general explanation (where does this information reside on the bootsector/MBR?)
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: DD Tool (Preserve Patition Information[Floppy/USB])
A floppy has no partitions. On devices that do, you can select the partition you want to write to (like /dev/sda1) and the partition table will not get modified.
If that doesn't help, there's always the seek=xxx and skip=xxx and conv=notrunc, look them up in the manual
If that doesn't help, there's always the seek=xxx and skip=xxx and conv=notrunc, look them up in the manual
Re: DD Tool (Preserve Patition Information[Floppy/USB])
What I am meaning to say is:
how would I go about doing that. I have tried to read the manual, but I can't figure out how I would use the command arguments, and I can't find where to information is located. I have tried the /dev/sdb1 (a partition on my USB drive) but I can't get it to boot from there. It seems it will only boot if I set it to /dev/sdb (the MBR), but then I loose the partition table for my device, which I need to store the kernel on.
Please help!
how would I go about doing that. I have tried to read the manual, but I can't figure out how I would use the command arguments, and I can't find where to information is located. I have tried the /dev/sdb1 (a partition on my USB drive) but I can't get it to boot from there. It seems it will only boot if I set it to /dev/sdb (the MBR), but then I loose the partition table for my device, which I need to store the kernel on.
Please help!
Re: DD Tool (Preserve Patition Information[Floppy/USB])
You have your kernel... in the partition table?
Anyway, try setting the partition bootable/active/whatever your partitioning tool calls it. The MBR is probably looking for that and not finding it.
Anyway, try setting the partition bootable/active/whatever your partitioning tool calls it. The MBR is probably looking for that and not finding it.
Re: DD Tool (Preserve Patition Information[Floppy/USB])
I don't know anything about DD.. but
In order for your usb drive to boot anything, it needs a partition set as active, as well as a bootloader at the start of that partition. I assume linux has something like 'fdisk' for messing with the partition table. Then use dd to put the bootsector at the first sector of the active partition.
In order for your usb drive to boot anything, it needs a partition set as active, as well as a bootloader at the start of that partition. I assume linux has something like 'fdisk' for messing with the partition table. Then use dd to put the bootsector at the first sector of the active partition.
Re: DD Tool (Preserve Patition Information[Floppy/USB])
Sorry for the confusion. I should have explained myself better. I have a USB flashdrive, currently formatted with one (1) ext2 partition. I need to have my operating system Kernel placed on this partition, and I need to have my bootsector copied to the disk.
I have tried various methods such as copying it to sdb itself, to copying to the partition sdb1. I have had no progress.
The method of copying it to sdb doesn't work, as it appears to make the drive unreadable (does this over-write the partition information), and the method of coping to the partition sdb1 just doesn't work at all (it won't boot).
I really do need this help, as I haven't been able to get anywhere beyond this (my kernel takes up 1 MB and I plan on expanding it rapidly so floppy is out of the question.)
I have tried various methods such as copying it to sdb itself, to copying to the partition sdb1. I have had no progress.
The method of copying it to sdb doesn't work, as it appears to make the drive unreadable (does this over-write the partition information), and the method of coping to the partition sdb1 just doesn't work at all (it won't boot).
I really do need this help, as I haven't been able to get anywhere beyond this (my kernel takes up 1 MB and I plan on expanding it rapidly so floppy is out of the question.)
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: DD Tool (Preserve Patition Information[Floppy/USB])
Have you even bothered to look up where the partition table is located, and hence, what not to overwrite?
There is no point in using DD (or anything else) if you don't know what you are doing with it.
There is no point in using DD (or anything else) if you don't know what you are doing with it.
Re: DD Tool (Preserve Patition Information[Floppy/USB])
Thanks to all who have helped, I believe that I found what I needed.