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-13-2007, 05:59 PM   #1
atoms999
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Rep: Reputation: 0
Question GRUB/boot problems after deleting extra Windows logical partition


Hi Folks,

Apologies for my newbie-ness and long-winded summary of what's happened, but hopefully the clue someone needs will be in here somewhere.

Before anything went wrong, my single HDD was divided into 5 partitions, one primary (C:\WindowsXP) and 4 logical (Windows F:, G:, H: and Ubuntu 6.06). Both WinXP and Ubuntu booted up perfectly everytime, and Linux could see and read all the partitions.

Then I deleted one of the extra Windows logical partitions and everything fell apart. Starting up the PC would crash as soon as the GRUB tried to start. I am unfamiliar with BASH editing or GRUB, so I ended up re-installing UBUNTU again on the now-empty partition. This re-made the GRUB in the process so that WindowsXP would also start up again too.

The problem is, the original UBUNTU was all set up "just the way I liked it" and I could not/can not figure out how to make it boot up instead. I can copy over all of the files I wanted, but not my Thunderbird email contacts or mailboxes, or the Firefox bookmarks, etc. etc.

I have been unable to edit GRUB to find the partitions I want, and cannot edit the menu.1st within (either) GRUB anyway it says I do not have permission even though I am the only user.

Here is the MENU.1ST from the Linux install that I want to boot from; this partition now shows up on the filesystem as hda6;


## ## End Default Options ##

title Ubuntu, kernel 2.6.15-28-386
root (hd0,7)
kernel /boot/vmlinuz-2.6.15-28-386 root=/dev/hda8 ro quiet splash
initrd /boot/initrd.img-2.6.15-28-386
savedefault
boot

title Ubuntu, kernel 2.6.15-28-386 (recovery mode)
root (hd0,7)
kernel /boot/vmlinuz-2.6.15-28-386 root=/dev/hda8 ro single
initrd /boot/initrd.img-2.6.15-28-386
boot


Any thoughts, comments or suggestions on how a newbie can get out of this would be gratefully accepted.

TIA

Andrew

Last edited by atoms999; 03-13-2007 at 08:54 PM.
 
Old 03-13-2007, 06:46 PM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728Reputation: 728
Friendly suggestion: Please don't post every line of a big file like that---all the commented entries don't help us.

You say that you can copy data from the other install of Ubuntu?? Thus, I assume you can mount that partition. In that partition, go into boot and setup simple aliases to vmlinuz and initrd. Then, reboot--when grub comes up, hit any key to stop the countdown, "c" for command line. At the grub prompt, you can manually boot the other partition---simply enter the commands the way they appear in menu.lst.
When you enter root (hdX,Y) you will get confirmation that it is a linux partition. Similary, when you enter the kernel command you will get feedback.

Once you get into the other installation, simply install grub from there.

If I have lost you, please post the output of fdisk -l and I can give you the exact commands.
 
Old 03-13-2007, 08:28 PM   #3
atoms999
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Original Poster
Rep: Reputation: 0
GRUB partition problems

Thanks -sorry. Some gibberish deleted from post. I am also struggling with how to have full access with BASH etc in the command line editor also- when I get to the terminal and type

atoms@desktop:~$ fdisk -l

nuthin' happens.

I shall retire and further peruse my UBUNTU Linux Bible (von Hagen) and see what progress I make.

Regards

A
 
Old 03-13-2007, 08:52 PM   #4
atoms999
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Got it (fdisk, anyway)

atoms@desktop:~$ sudo fdisk -l

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 972 7807558+ b W95 FAT32
/dev/hda2 973 3697 21888562+ f W95 Ext'd (LBA)
/dev/hda5 973 2508 12337857 83 Linux
/dev/hda6 * 2810 3656 6803496 83 Linux
/dev/hda7 3657 3697 329301 82 Linux swap / Solaris

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 30401 244196001 7 HPFS/NTFS
atoms@desktop:~$
 
Old 03-13-2007, 09:08 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,222

Rep: Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019
Contrary to your first post, it looks like you deleted two intervening partitions.
Things get a bit murky, because it's not just grub that needs to be rectified - /etc/fstab (on your original Ubuntu) also needs ajustment to handle the system mounts.
try some (non-destructive) tests:
- reboot, and at the grub menu, hit the <c> key, as per pixalleny. Enter the following and hit <Enter>
kernel (hd0,5)/boot/vmlinuz-2.6.15-28-386 root=/dev/hda6 ro quiet splash
(get it right - no extra spaces). Then enter the following and hit <Enter>
initrd (hd0,5)/boot/initrd.img-2.6.15-28-386
Finally <b> to boot it.

See if that flies - it'll panic eventually, but no harm done.
 
Old 03-13-2007, 10:29 PM   #6
atoms999
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Wunderbar!

I am back in my original Linux again, just as I left it. Thanks very much.

You were correct about the missing partitions. Once I saw what happened after deleting one partition, and got Linux going again on a separate partition once more, I figured I had nothing left to lose by deleting the remaining two unwanted Windows logical partitions.

Now my two biggest questions are;

How to edit GRUB so that this original Linux partition is once again active in the boot list.

How to delete the second (spare) Linux installation/partition so I am ultimately down to two ~15GB-ish partitions for (this) Linux and Windows XP, and the associated swap and root partitions.

Cheers from here

Quote:
Originally Posted by syg00
Contrary to your first post, it looks like you deleted two intervening partitions.
Things get a bit murky, because it's not just grub that needs to be rectified - /etc/fstab (on your original Ubuntu) also needs ajustment to handle the system mounts.
try some (non-destructive) tests:
- reboot, and at the grub menu, hit the <c> key, as per pixalleny. Enter the following and hit <Enter>
kernel (hd0,5)/boot/vmlinuz-2.6.15-28-386 root=/dev/hda6 ro quiet splash
(get it right - no extra spaces). Then enter the following and hit <Enter>
initrd (hd0,5)/boot/initrd.img-2.6.15-28-386
Finally <b> to boot it.

See if that flies - it'll panic eventually, but no harm done.
 
Old 03-13-2007, 11:02 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,222

Rep: Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019Reputation: 1019
O.K., it seems you have UUID or labels in your fstab - lucky you.
Boot your "new" Ubuntu, goto a terminal, and "sudo gedit /boot/grub/menu.lst"
Standard Windowed full-screen editor.

Create a new entry (the title line), add the "root" line from your other Ubuntu, then the two lines I gave you above.
Reboot and check it works.

Reboot into your "old" Ubuntu, check the menu.lst there (the "root" directive will be different), then from a terminal, enter "grub-install /dev/hda".
 
Old 03-15-2007, 09:52 PM   #8
atoms999
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00
O.K., it seems you have UUID or labels in your fstab - lucky you.
Boot your "new" Ubuntu, goto a terminal, and "sudo gedit /boot/grub/menu.lst"
Standard Windowed full-screen editor.
++This worked -one time only. Next reboot, I got error 15(?) "file not found"


Quote:
Originally Posted by syg00
Reboot into your "old" Ubuntu, check the menu.lst there (the "root" directive will be different), then from a terminal, enter "grub-install /dev/hda".
++Tried this, and got;
atoms@atoms-desktop:~$ grub-install /dev/hda
/dev/hda8: Not found or not a block device.
atoms@atoms-desktop:~$

Can still start up 'original' Linux the manual way as described previously, but not automatically via GRUB
 
  


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
How to bypass 'Grub' after deleting the Linux partition, so that Windows XP can load? Marion D Poff Linux - Software 11 03-15-2011 03:52 PM
recovering from grub-install /dev/hda1 deleting windows XP boot loader Steve Mading Linux - Software 7 02-22-2010 07:53 PM
trying to boot windows off logical partition cjae Linux - Newbie 2 02-21-2007 07:40 AM
Can windows boot from a logical partition? faezeh Fedora 15 04-03-2005 12:12 PM
Deleting Extra Partition in Mandrake 8.1 mr805newbie Linux - Newbie 4 08-13-2004 05:18 PM


All times are GMT -5. The time now is 10:30 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration