LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 05-07-2008, 07:58 PM   #1
sehku17
LQ Newbie
 
Registered: Sep 2007
Location: St. Louis, MO
Distribution: Ubuntu & derivatives, Fedora
Posts: 19

Rep: Reputation: 0
Grub re-written following update [Kubuntu]


Ok, so I have this Box which I have decided to update to the latest and greatest Ubuntu. So I go through adept (This is the packaged manager when kubuntu-desktop is installed, not synaptic) and I follow the instructions as it goes along, no errors are returned, a couple of things were discontinued, etc. , but all in all everything went smooth. I open up a terminal and type "sudo shutdown -r now" hoping to be greeted in a couple of minutes by a shiny new desktop. No. The grub menu was destroyed. All that displayed were the Ubuntu 7.10 memtest and Windows XP (I'm on a dual boot, but really never use anything but Linux). What I think happened was that the updater took out the Ubuntu 7.10 entries (Why not? You wouldn't need them once 8.04 was on there.), but somehow forgot to put in the new 8.04 entries.

Now, I'm not an idiot. I went straight to /boot/menu.lst (from a live cd) and attempted to manually create an entry towards the correct kernel. But when I opened the file browser (konquerer in this case) and tried to find the kernel images (so I know where to direct the grub entry to) they weren't even there. So, I copied the files from /boot on the Ubuntu 8.04 live cd I was booted into, thinking "It's the same kernel anyway." Then I attempted to write in the grub entry. Seemed okay. Rebooted. Grub entry was there. Pressed Enter.

Kernel panic. Uh-oh, what have I done now? I re-booted into the live cd, and immediately opened a terminal emulator and typed "sudo grub" At the grub shell, I put "root (hd0,4)" which was of course appropriate for my partition, and "setup (hd0)" But in my heart I knew that I was doomed to fail since the config file that I was using was still not right. Of course it did fail, and I tried another plan.

I checked the web and found this http://boff.wordpress.com/2007/01/17...rub-boot-menu/ and, in accordance, added a couple of lines like initrd and such, which I had neglected to put in before. Kernel stays active now, but X won't start. No idea why, but I'm assuming that I have to put another couple of arguments to grub to get it to detect my display right.

The question is first, has anyone else experienced something similar? Why didn't the updater re-write menu.lst properly? How can it be fixed without re-installing the OS and losing my configuration files and programs? And that, given the above, what would you recommend in order to get that shiny new desktop I so long for?
 
Old 05-08-2008, 09:53 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,517

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
Posting the results of 'fdisk -l' would be helpful. Also, indicate which partitions contain 8.04 and 7.10. I assume you chose the default on the new install of putting bootloader in mbr? Are you now able to access the menu.lst? from 8.4 or 7.10?
 
Old 05-08-2008, 03:29 PM   #3
sehku17
LQ Newbie
 
Registered: Sep 2007
Location: St. Louis, MO
Distribution: Ubuntu & derivatives, Fedora
Posts: 19

Original Poster
Rep: Reputation: 0
Here's how the disk is partitioned (the output of fdisk -l):


Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x3972cd75

Device Boot Start End Blocks Id System
/dev/sda1 * 1 4972 39937558+ 7 HPFS/NTFS
/dev/sda2 4973 9704 38009790 5 Extended
/dev/sda5 * 4973 5649 5437971 83 Linux
/dev/sda6 5650 5906 2064321 82 Linux swap / Solaris
/dev/sda7 5907 9704 30507403+ b W95 FAT32


And the uncommented lines of menu.lst:

default 0
timeout 10
title Kubuntu 8.04
root (hd0,4)
kernel /boot/vmlinuz-2.6.24-16-generic root=/dev/sda5 ro quiet
splash
initrd /boot/initrd.img-2.6.24-16-generic.bak
quiet
savedefault
boot
title Other operating systems:
root
title Microsoft Windows XP Professional Edition
root (hd0,0)
savedefault
makeactive
chainloader +1



I am accessing all of these files from the installed OS, which, as can be seen from menu.lst, is running the 8.04 kernel. I did choose the default for the attempted re-installation of GRUB. It may be worth noting that many other things (like the network) have also failed in addition to X, so to get these files off of the hard drive I have to use a live CD, for which I am using Ubuntu 8.04.

Thanks for the input. Any help is appreciated.
 
Old 05-08-2008, 07:42 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,517

Rep: Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493Reputation: 2493
I noticed in your post of the results of 'fdisk -l' command you have the (*) active set for sda1 and sda5 and I don't think you can have two active partitions or an active logical on the same drive. Not sure that has anything to do with your problem though.

You seem to only have one Linux installed on, sda5, so you have installed 8.04 over 7.10. Was that your intention? Are you able to boot xp?
 
Old 05-11-2008, 09:59 AM   #5
sehku17
LQ Newbie
 
Registered: Sep 2007
Location: St. Louis, MO
Distribution: Ubuntu & derivatives, Fedora
Posts: 19

Original Poster
Rep: Reputation: 0
My intention was to have a working update. On the update, grub was re-written, and I cannot get X to start because grub did not load the modules, but I don't know what to put into grub to make it.

Sure I can boot XP, but it's utterly horrible. Doesn't really help with the problem.

And if I had this successfully solved, I wouldn't have asked the question.
 
Old 05-11-2008, 10:19 AM   #6
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
The menu list looks correct, where does it stop, you keep mentioning X. If it starts to load files of Ubuntu then quits grub has done its job. Tell us do you get a blank screen after selecting Ubuntu or do you get a grub prompt or do some files load then quit? Are there any error messages?
 
Old 05-11-2008, 11:07 AM   #7
verndog
Member
 
Registered: Oct 2007
Posts: 278

Rep: Reputation: 67
Quote:
Originally Posted by yancek View Post
I noticed in your post of the results of 'fdisk -l' command you have the (*) active set for sda1 and sda5 and I don't think you can have two active partitions or an active logical on the same drive. Not sure that has anything to do with your problem though.

You seem to only have one Linux installed on, sda5, so you have installed 8.04 over 7.10. Was that your intention? Are you able to boot xp?
I think your right about the two active partitions. I checked another pc that has dual-boot and only one (*) is active.
 
  


Reply

Tags
grub, kubuntu, update, upgrade



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
fatal error - grub cant be written to hd0 PlaneCharlie Linux - Newbie 2 12-02-2007 12:04 AM
Kubuntu Dapper to Edgy Update Optiker Ubuntu 2 12-19-2006 01:43 PM
Ubuntu/Kubuntu - update notifier Mithrilhall Linux - Newbie 3 07-21-2006 03:02 PM
update firefox on kubuntu secret_force Linux - Newbie 1 01-05-2006 03:45 PM
/boot/grub/menu.lst gets re-written by apt-get..NOT COOL terrapin24h Ubuntu 2 07-04-2005 09:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 08:05 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
Open Source Consulting | Domain Registration