> > > On 22.07.2017 19:35, Aruna Hewapathirane wrote: > [...] > >>> sudo losetup -o $((2048*512)) /dev/loop1 hd.img > >> > >> should'nt it be 63*512 ? > >> > > > > nope should be 2048 and this is why --> > > https://superuser.com/questions/352572/why-does-the- partition-start-on-sector-2048-instead-of-63 > > it is for new hard disks,
Yes agreed it is for newer hard disks.. > here it conflicts with geometry used: > > >>>> fdisk -u -C100 -S63 -H16 hd.img Actually no because if you look at the initial email hao sent carefully in step 2: 2. Create a primary partition. fdisk -u -C100 -S63 -H16 hd.img Notice even though hao *has* specified the geometry, fdisk does not show this ? Try it and see... if we go through the process and ask fidsk to print the partition information. This is what I see : ------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ Command (m for help): p Disk hd.img: 49.2 MiB, 51609600 bytes, 100800 sectors ---> geometry is usually shown on the next line but zilch here ? Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x4c0d7fa4 Device Boot Start End Sectors Size Id Type hd.img1 2048 100799 98752 48.2M 83 Linux ------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------------------------------ But if I do this: /sbin/fdisk -c=dos -u -C100 -S63 -H16 hd3.img then fdisk complains saying DOS-compatible mode is deprecated, and after going through the process once again and we ask fdisk to print the partition we see: -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Command (m for help): p Disk hd3.img: 49.2 MiB, 51609600 bytes, 100800 sectors Geometry: 16 heads, 63 sectors/track, 100 cylinders <---- fdisk shows geometry this time around ah-ha ! Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x030e7198 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- I put together a small video will make it easier for you to see all the above: https://youtu.be/kmG7CCy-F9Q > and maybe conflicts with Bochs BIOS options or disk geometry options ? Mmm.. I don't believe there are any conflicts. Please watch the video I sent earlier. It has a fix and working solution : https://youtu.be/6oqTu8utMe4 :) Thank's - Aruna > > -- > Best regards, > Kamil Konieczny > Samsung R&D Institute Poland >
_______________________________________________ Kernelnewbies mailing list [email protected] https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
