partition does not end on cylinder boundary. can't boot ubuntu.
I have a 500g hard drive using dual boot win7 and ubuntu 10.04.2. The system is boot from MBR using Grub1.98.
The partitioned as the follows: ----------------------------------- system reserve100m |win7,42g|software 100g|empty 100g|extended 253g logic partition is as follows: | ubuntu / 250g | swap 4g Since I want to make use of the "empty" part. I delete it and the "software" partition under win7. Then I create a new partition on the part. After I reboot my pc, the screen shows: >> operating system no such partition. >> grub rescue> The I use ubuntu live usb disk and find the following result. ubuntu@ubuntu:~$ sudo fdisk -l /dev/sda Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x3ef75c5c Device Boot Start End Blocks Id System /dev/sda1 * 1 13 102400 7 HPFS/NTFS Partition 1 does not end on cylinder boundary. /dev/sda2 13 5100 40857600 7 HPFS/NTFS /dev/sda4 30006 60802 247368705 5 Extended Partition 4 does not end on cylinder boundary. /dev/sda5 60278 60802 4204544 82 Linux swap / Solaris ubuntu@ubuntu:~$ sudo fdisk -lu /dev/sda Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x3ef75c5c Device Boot Start End Blocks Id System /dev/sda1 * 2048 206847 102400 7 HPFS/NTFS Partition 1 does not end on cylinder boundary. /dev/sda2 206848 81922047 40857600 7 HPFS/NTFS /dev/sda4 482035710 976773119 247368705 5 Extended Partition 4 does not end on cylinder boundary. /dev/sda5 968364032 976773119 4204544 82 Linux swap / Solaris Can anybody tell me how to resize my partition table so I can KEEP MY DATA on the ubuntu / partition. Or someway I can get my ubuntu / partition back. Thanks a lot! |
|
Thank you Eddy1. I read the link you post, but my situation is different.
The main problem is that my original ubuntu root partition is not identified! I can't find it using fdisk -l. It should be contained in the extended partition sda4. But my fdisk -l resuts : /dev/sda4 482035710 976773119 247368705 5 Extended Partition 4 does not end on cylinder boundary. /dev/sda5 968364032 976773119 4204544 82 Linux swap / Solaris The ubuntu partition is missing...So I can't mount it. I need change my partition table to get my ubuntu root partition back. |
Can't imagine why the hell you did this from Windows - that liveCD would have been way better ...
I would do all of this from "fdisk" - just add a new logical partition at the beginning of the extended. Use all the space up to the swap. Let it default to type Linux. That may/should be all you need to get it booted. You might be able to do this from gparted, but I'd be worried it will format the new partition when you create it - and trash all your (obviouly not backed-up) data. <rant> Note my sigline - in future get a backup (or 2) before fucking with partitions. And don't use Windoze, use gparted from the liveCD. </rant> |
The op can use gparted to erase wins partitions then create linux partition with gparted which can copy data from 1 partition to another but will still have to use rescue disk to boot.
|
Quote:
|
As already stated a couple of times, the OP doesn't have a (source) partition defined. None of those links will help until that is rectified.
|
I was thinking that the problem was that os is on extended partition and that the op could create a primary partition and copy os to it.
I have only copied data from one partition to another, but I figured that maybe it would work, |
Quote:
Quote:
|
I'm not convinced the "cylinder boundary" message is a concern. It can be, but the fact that fdisk lists the partitions is a good sign. When I've had real problems with this, fdisk won't even open the partition table.
We'll see when the OP responds. |
If the op only deleted without reformat they can use test disk possibly and recover all.
It's also on gparted-live |
1. trying to mount /dev/sda4 using LiveCD should mount Ubuntu.
Or 2. Creating new partition on sda4 without formating it should work too. I don't think fdisk formats the filesystem. It is done using mke2fs. Or 3. backup partition using dd if=/dev/sda4 of=/home/ubuntu.img bs=1024 . the image file will take as much space as the partition itself. Then mount the image using mount ubuntu.img /mnt/ubuntu -t ext3 -loop . Correct me if the command parameters are wrong. Partition boundary error has nothing to do with missing partition. While installing ubuntu install grub on mbr and not on partition to boot properly. |
thank everyone in this post. I solved the question (partially).
Here is my solution, I use live usb to boot the pc, then I use testdisk to recover the partition table. It turns out the extended partition is missing. But the ubuntu root partition is back, that's all I want right now. Then I reinstall the grub into mbr. using grub-install And reboot, then update-grub Now I can use my ubuntu system, but there is still problem in fdisk -l xfli@xfli-desktop:~/Documents$ sudo fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x3ef75c5c Device Boot Start End Blocks Id System /dev/sda1 1 13 102400 7 HPFS/NTFS Partition 1 does not end on cylinder boundary. /dev/sda2 13 5100 40857600 7 HPFS/NTFS /dev/sda3 * 30006 60278 243164160 83 Linux /dev/sda4 60278 60802 4204536 82 Linux swap / Solaris But currently I will not handle the partition until I have my data backup. |
1.'testdisk' is a great tool you used. I was thinking of tools but couldn't remember an Open Source tool that will recover partition table.
2.Only 4 primary partitions are allowed per disk, hence the missing disk space. 3.Delete the swap partition and create new logical swap partition. Extended partition is automatically defined with fdisk. 4.You may need to map the newly created swap in ubuntu in fstab entry. 5.Create as many logical partitions from free space left. Congratulations for getting back your Ubuntu. It was really a very difficult task and could have led to data loss. And you are right. Backup first. |
Thanks.
I only use my ubuntu right now. It is about 250g out of 500g. I am very busy recently so I am thinking about fix my whole disk when I have time. Anyway, I am considering getting rid of windows partition and manage my whole disk by ubuntu. |
All times are GMT -5. The time now is 09:31 AM. |