LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-23-2008, 10:36 PM   #1
jeberd
LQ Newbie
 
Registered: Jun 2007
Posts: 6

Rep: Reputation: 0
rEFIt problem, cannot boot linux after using gparted to shrink non-OS partition


I had a working dual boot config with OSX and ubuntu on an iMac (most recent refresh). Everything was fine until I edited a partition using gparted while running ubuntu. Now when I boot into rEFIt my linux partition is reported as Legacy OS and if I select it, it gives me an error about not finding the OS and the computer freezes necessitating a hard shutdown.

The configuration that I had was: (sorry for the poor alignment but it looks fine in the edit box, but when I post it removes all of the extra spaces used to line things up)

part#/ used for/ size

1/ EFI/ ~200M
2/ OSX/ ~80G
4/ ubuntu/ ~30G
3/ file space (fat32)/ ~190G
5/ linux swap/ ~2G

Note that partition #4 is actually before #3 on the disk. What I tried to do was to make another partition using some of the file space (part# 3) that I was going to install a second linux distribution on. Editing of the partition went fine, but after rebooting I cannot get back to my original ubuntu partition. OSX loads just fine. I can use rEFIt to boot live cd's just fine. Only my ubuntu partition is not working, but like I said it knows it is there, just calls it Legacy. I did not change the ubuntu partition at all when I used gparted, I only shrunk the file space to make some free space. I never actually installed another OS because this problem arose and I didn't want to complicate things.

I checked the rEFIt documentation and there was some mention of problems caused by parted [http://refit.sourceforge.net/doc/c4s5_parted.html]. It didn't seem to explain my situation exactly though and it said that the problems were fixed in ver 0.9. I am using the most recent version, ver. 0.12. Regardless, I checked to make sure that there was not any flags set on the ubuntu partition as it instructed to solve the similar problem and there are none. This same problem happened to me before when I tried to shrink the actual ubuntu partition and the only way I was able to resolve it before was to reinstall ubuntu which caused it to work. I didn't ask for help before though and that was just my solution. I'd prefer not to have to do that... All of my files are fine, I can see them when booting a live cd, I just cannot seem to be able to boot the linux. I think this should be an easy enough fix, I just am not familiar enough to do it on my own. The computer loads rEFIt then rEFIt passes off to GRUB to load ubuntu under normal operation. It never loads GRUB though since the change to Legacy OS from Linux OS.

This is the output from the partition inspector that comes with rEFIt. It says that they are synchronized though they do not even have the same number of partitions. The ones that are listed have the same ending points, so maybe that is what it means by 'synchronized':


*** Report for internal hard disk ***

Current GPT partition table:

#/ Start LBA/ End LBA/ Type
1/ 40/ 409639/ EFI System (FAT)
2/ 409640/ 127599183/ Mac OS X HFS+
3/ 211559985/ 605538044/ Basic Data
4/ 127604295/ 211559984/ Basic Data
5/ 616896000/ 625137344/ Linux Swap

Current MBR partition table:

#/ A/ Start LBA/ End LBA/ Type
1/ / 1/ 409639/ ee EFI Protective
2/ / 409640/ 127599183/ af Mac OS X HFS+
3/ */ 211559985/ 605538044/ 0c FAT32 (LBA)
4/ / 127604295/ 211559984/ 83 Linux

MBR contents:
Boot Code: Unknown, but bootable

Partition at LBA 40:
Boot Code: None (Non-system disk message)
File System: FAT32
Listed in GPT as partition 1, type EFI System (FAT)

Partition at LBA 409640:
Boot Code: None
File System: HFS Extended (HFS+)
Listed in GPT as partition 2, type Mac OS X HFS+
Listed in MBR as partition 2, type af Mac OS X HFS+

Partition at LBA 211559985:
Boot Code: None (Non-system disk message)
File System: FAT32
Listed in GPT as partition 3, type Basic Data
Listed in MBR as partition 3, type 0c FAT32 (LBA), active

Partition at LBA 127604295:
Boot Code: None
File System: ext3
Listed in GPT as partition 4, type Basic Data
Listed in MBR as partition 4, type 83 Linux

Partition at LBA 616896000:

Boot Code: None
File System: Unknown
Listed in GPT as partition 5, type Linux Swap

Last edited by jeberd; 12-23-2008 at 10:48 PM. Reason: i added '/' between entries because the extra spaces were being deleted
 
Old 12-24-2008, 04:15 AM   #2
htnakirs
Member
 
Registered: Mar 2007
Posts: 239

Rep: Reputation: 34
I didn't read the entire post.

Did you suitably modify the menu.lst file to reflect the changed partition number?
 
Old 12-25-2008, 12:55 PM   #3
jeberd
LQ Newbie
 
Registered: Jun 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by htnakirs View Post
I didn't read the entire post.

Did you suitably modify the menu.lst file to reflect the changed partition number?
You mean for GRUB? Also, I didn't change any partition numbers. All I did was shrink one partition, I didn't even format the new space, I just left it as unformated space.

I did not change anything with regards to linux. All I did was change a partition that was used solely for data (no OS on the partition) that resulted in rEFIt not working, so I assumed that the problem was with rEFIt. Are you suggesting that I might need to also change part of the linux system?

For reference, when I try and boot ubuntu linux from rEFIt, I just get a blank screen with an error. There is no indication that GRUB even started. Also, I have since returned the partition back to its original size so the partition start/end values should be back aligned though I don't know if possibly the GUID shifts still.

Thanks for the help, I haven't found anything on this after week+ of searching and currently cannot get my ubuntu installation to boot at all. So even if you know of a tedious workaround to force it to boot, that would be helpful.

Last edited by jeberd; 12-25-2008 at 12:58 PM.
 
Old 12-25-2008, 11:42 PM   #4
htnakirs
Member
 
Registered: Mar 2007
Posts: 239

Rep: Reputation: 34
Yes I am referring to the menu.lst file found in /boot/grub folder.

In my experience, gparted tends to do things without properly informing the user. In your case, the partition numbers might have been reordered without you noticing. So the Ubuntu partition which was 4 initially, has now become 3.
I am guessing modifying the menu.lst file to show the correct partition (hdX,2) instead of (hdX,3) should help.

I haven't used refit. But, gparted itself has the capability to resize partitions.

The tedious work around would be simply to reinstall grub.

Also, there is always a possibility that a resize operation has rendered data unusable, irrespective of refit/gparted's successful resize. You should check the partition info with testdisk, just in case. If necessary, a backup of the MBR can be restored.
 
Old 01-04-2009, 07:36 AM   #5
olavjunior
LQ Newbie
 
Registered: Jan 2009
Posts: 1

Rep: Reputation: 1
Having the exact same problem

I wanted to make a file sharing partition between ubuntu and osx, so I shrinked osx partition and made a blank, unformatted partition.

This changed my linux partition from sda3 to sda4 as the new empty partition now became sda3.

So rEFIt now probably tries to boot the sda3 empty partition instead of sda4, giving me the "no operation system"error.

That's why I doubt that neither reinstalling grub or updating the boot/grub/ will resolve this issue.

I have to get rEFIt to boot sda4 in stead. Any ideas on how to manage this?

EDIT: Fixed it with restoring grub described here http://ubuntuforums.org/showpost.php...55&postcount=5

Last edited by olavjunior; 01-05-2009 at 07:25 AM.
 
Old 01-28-2009, 04:39 AM   #6
tom4everitt
Member
 
Registered: Jan 2009
Location: Stockholm
Distribution: Fedora, Ubuntu, Mac OS X
Posts: 78

Rep: Reputation: 23
I can confirm, the link given above solved the problem for me as well. I had to choose to setup grub to (hd0) (instead of (hd0,4) e.g) though. I feared this would overwrite my rEFIt-reboot, but everything works as normal now (rEFIt still in charge of startup). So (hd0) seems to be the place to install it.
 
Old 01-29-2009, 01:51 AM   #7
jeberd
LQ Newbie
 
Registered: Jun 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thumbs up

Great!

The link for reinstalling GRUB also worked to fix my problem. I was booting using the Ubuntu 8.04 live cd and had to do 'sudo grub' instead of 'su' then 'grub' but that is minor.

Also, I installed with (hd0,3) as per the guide and rEFIt booted linux right up after that. I didn't try using (hd0) like the previous poster, but possibly either would work.

Thanks to tom4ever and olavjunior for pointing out this simple fix. I spent 2 months looking for this 5 minute fix. Thanks for helping guys.
 
  


Reply



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
Cannot boot ubuntu linux after using gparted on rEFIt iMac jeberd Linux - General 2 01-28-2009 02:09 AM
Gparted for a new partition mcbenus Linux - Software 10 09-09-2007 08:37 PM
what version of Linux lets you shrink the Windows partition to install OS. Felpipe Linux - General 6 02-03-2007 12:21 AM
I can't shrink my empty partition yeehi Linux - General 3 10-20-2004 02:23 PM
Can you shrink a partition? ericcarlson Linux - Software 1 01-22-2002 05:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:21 PM.

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
Open Source Consulting | Domain Registration