LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-03-2011, 11:01 AM   #1
cddodo
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Rep: Reputation: 0
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!
 
Old 03-03-2011, 01:03 PM   #2
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
http://karuppuswamy.com/wordpress/20...rescue-prompt/
 
Old 03-03-2011, 07:39 PM   #3
cddodo
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 03-03-2011, 09:10 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
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>
 
Old 03-03-2011, 10:30 PM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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.
 
Old 03-03-2011, 11:28 PM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
The ubuntu partition is missing...So I can't mount it. I need change my partition table to get my ubuntu root partition back.
http://www.ghacks.net/2010/06/03/cop...-with-gparted/
 
Old 03-03-2011, 11:47 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
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.
 
Old 03-04-2011, 12:00 AM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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,
 
Old 03-04-2011, 01:33 AM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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 see what you mean now it's only swap.

Quote:
Partition 4 does not end on cylinder boundary.
/dev/sda5 968364032 976773119 4204544 82 Linux swap / Solaris
 
Old 03-04-2011, 04:26 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
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.
 
Old 03-04-2011, 05:01 AM   #11
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
If the op only deleted without reformat they can use test disk possibly and recover all.
It's also on gparted-live
 
Old 03-04-2011, 05:20 AM   #12
milindlokde
Member
 
Registered: Apr 2007
Location: Mumbai, India
Distribution: Fedora, ubuntu
Posts: 120

Rep: Reputation: 21
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.
 
Old 03-04-2011, 07:58 AM   #13
cddodo
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 03-04-2011, 09:34 AM   #14
milindlokde
Member
 
Registered: Apr 2007
Location: Mumbai, India
Distribution: Fedora, ubuntu
Posts: 120

Rep: Reputation: 21
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.
 
Old 03-05-2011, 11:26 AM   #15
cddodo
LQ Newbie
 
Registered: Mar 2011
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition 1 does not end on cylinder boundary.,why is this? cola Linux - Newbie 3 01-29-2010 08:32 AM
Partition 1 does not end on cylinder boundary wood_morris Linux - Newbie 6 08-28-2009 05:57 AM
Partition 1 does not end on cylinder boundary. Galaxy_Stranger Fedora 22 08-24-2009 01:55 AM
need partition to end on cylinder boundary Master of Reality Linux - General 5 02-03-2006 10:51 PM
Partition does not end on cylinder boundary snisheeth Linux - General 0 01-22-2004 08:38 PM


All times are GMT -5. The time now is 05:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration