Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Friday, August 15, 2008

NTFS fusion: error 510 -Partition Magic

Source
If you get hung up on doing an NTFS partition, which needs to be type "07" for MS Windows to even work, first write zeroes to all of the new disk:
dd if=/dev/zero of=/dev/hdb
Then partition. You can make the MS Windows partition linux type "83" and fix it later. Heres how you fix it so it's NTFS:::

If it's in an extended partition:
dd if=/dev/hdb | hexdump -C | grep '00 83'

Look where it finds that on the terminal screen. Go there with dd:
dd if=/dev/hdb of=/directory/file.bin skip=10000 count=1

But figure out, by the offset in hexdump, where dd has to go. In the above example, dd is going to start at decimal offset 5,120,000. That's the default bs=512 times skip=10000. You're skipping 10000 blocks of 512 bytes, then recording a single sector, count=1. Hex offset is calculated with a calculator in linux, 5,120,000 d = 0x4e2000 h. Your screen is going to give you hex values, but dd works in decimal. You have to convert the hex offset where "00 83" are found to decimal so you can make dd go to the right spot. When you capture file.bin, open it with a hex editor and change "00 83" to "0007", then:
dd if=/directory/file.bin of=/dev/hdb seek=10000

That writes the new value to the extended partition.
If MS Windows is in a primary partition, is it partition 1, 2, 3, or 4?
0x1c2
0x1d2
0x1e2
0x1f2

Contain the partition type indicators for the drive. Do:
dd if=/dev/hdb of=/directory/file.bin count=1

That will record sector 1, the MBR, which contains the primary partition. Type "05" is extended, type "83" is linux, type "82" is linux swap, "01" is DOS, "07" is NTFS/HPFS. So, if your partitioning program doesn't make NTFS partitions, and you made a linux partition for MS Windows, change the corresponding type indicator:
location hex offset in sector 1:
0x1c2
or
0x1d2
or
0x1e2
or
0x1f2

with a hex editor. Screw it up afew times. Use fdisk -l in linux to see the aprtition is NTFS, and to see all your partitions. Now don't freak, just take it slow, easy, like you would with a really attractive, classy woman on a date. Give her what she wants, and she'll give you what you want. That's what linux is all about.
Just one of them, depending on which primary partition, 1-4 you want to be NTFS, "07". Then, write the file back to the HDD. The partition is now NTFS type
-------------------------------------------------------
Source

Nope, that's downright impossible AFAIK - look closer at his picture. The 2nd primary partition is after the logical, not in it. There's nothing in the specifications for disk partitions about the
order they occur in. There's a limit of 4 partitions because that's all the space there is in the boot sector for the 4 16-byte entries describing them. Any one of those entries can be an extended partition.
I've had secondary data drives with NO primary partitions so pulling them in and out didn't change letter assignments. If vaskark is both brave and desperate, he can do the following:
Use a linux rescue CD to back up the hard-drive boot sector to a floppy using
dd if=/dev/hda of=/dev/fd0 bs=512 count=1
Then, use a disk sector editor to set bytes 01BE thru 01ED to zeros for sector 0 of /dev/hda. Doing this will blow off partitions 4, 3, and 2 (yes, the entries are in reverse order). Before you do anything, check whether bytes 01FE and 01FF are AA55 to be sure it's the right sector.
Reboot, and all there should be is a single primary partition of your C drive. If the reboot doesn't work, use fixmbr or whatever from the XP rescue console (I'm fuzzy on this part having only done stuff like this from Win9x) and try again.
Now use PM to put a logical partition on the all the disk space that's left, lay out the additional FAT32 chunks (leaving unused space), and install Ubuntu (letting it use that unused space however it sees fit). If this makes things worse instead of better, use that linux rescue CD to restore the hard-drive boot sector from the floppy via
dd if=/dev/fd0 of=/dev/hda bs=512 count=1
--------------------------------------------------------
O mejor: usen Acronis Disk Director Suite v10 0 2160

No comments: