Welcome, Guest. Please login or register.
April 20, 2014, 02:44:49 AM
Home Help Search Calendar Login Register
Show unread posts since last visit.
News: Let Pardus-Anka become #1: Pardus-Anka Bug ReportPardus-Anka World Google+ | The Pardus wiki  | Visit Pardus-Anka official website  | Register as forum member?  Email the moderator!

+  Pardus Worldforum
|-+  Assistance
| |-+  Bugs
| | |-+  Grub: wrong entry for new kernel after setting Windows as default
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Grub: wrong entry for new kernel after setting Windows as default  (Read 2488 times)
roverrat
Pardus Master
***
Posts: 236



View Profile
« on: July 02, 2007, 08:18:13 AM »

After installing Pardus 2007.2 RC on my dual boot system I set Win XP as the default OS in /boot/grub/grub.conf:

Code:
default 0
timeout 10
splashimage = (hd1,2)/boot/grub/splash.xpm.gz
background 10333C

title Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1

title Pardus 2007.2 RC
root (hd1,2)
kernel (hd1,2)/boot/kernel-2.6.18.8-84 root=/dev/sdb3
video=vesafb:nomtrr,pmipal,ywrap,1024x768-32@60 console=tty2
mudur=language:en resume=/dev/sdb2
initrd (hd1,2)/boot/initramfs-2.6.18.8-84

I then ran pisi and got a the kernel upgrade to 2.6.18.8-85.
After a reboot I wasn't able to boot the new entry for Pardus 2007.2 RC [2.6.18.8-85]
I then started with the older kernel and had a look at grub.conf. The entry for the new kernel looked like this:

Code:
title Pardus 2007.2 RC [2.6.18.8-85]
rootnoverify (hd0,0)
makeactive
chainloader +1

So it appears it has copied the entry for Win XP - which was first in the list - and put on a Pardus 2007.2 RC title!
This wasn't a big problem for me since I then changed the entry by hand. It now says:

Code:
title Pardus 2007.2 RC [2.6.18.8-85]
root (hd1,2)
kernel (hd1,2)/boot/kernel-2.6.18.8-85 root=/dev/sdb3
video=vesafb:nomtrr,pmipal,ywrap,1024x768-32@60 console=tty2
mudur=language:en resume=/dev/sdb2
initrd (hd1,2)/boot/initramfs-2.6.18.8-84

and the new kernel boots fine. Has anyone else had a similar experience?
« Last Edit: July 02, 2007, 09:30:27 AM by roverrat » Logged
Jan Gnodde
Global Moderator
Pardus Guru
*****
Gender: Male
Posts: 397


View Profile WWW
« Reply #1 on: July 02, 2007, 10:08:12 AM »

Whenever the kernel gets a update the first entry of the grub-config will be used to make a new entry (for the new kernel). So don't put Windows as the first entry.
You can put windows as the second entry and change the "default" entry in the head of the menu.lst to "1". But then you'll have to change that after every kernel-update, because the new kernel will be put at the top, and so the Windows entry will drop one place (and no longer be at the second place).

Jan.
Logged
roverrat
Pardus Master
***
Posts: 236



View Profile
« Reply #2 on: July 03, 2007, 12:34:17 PM »

Thanks Jan.

I still consider this a bug though. In other distros I can  put static boot stanzas before and/or after the list with kernels that get updated automatically. In that way I can put windows first and don't have to worry about grub making nonsense entries when the next kernel upgrade takes place  Angry I suppose there must be a way to accomplish the same in Pardus, so I'll keep looking...
« Last Edit: July 03, 2007, 12:38:51 PM by roverrat » Logged
Jan Gnodde
Global Moderator
Pardus Guru
*****
Gender: Male
Posts: 397


View Profile WWW
« Reply #3 on: July 03, 2007, 12:59:54 PM »

I suppose there must be a way to accomplish the same in Pardus

Indeed, it shouldn't be a problem.

Jan.
Logged
Kavani
Guest
« Reply #4 on: July 07, 2007, 07:18:14 AM »

It's funny you would post this this week roverrat, I recently found this out with my system.  If you figure out the stanza, could you let me know?  I'll try to work on it some this weekend.
Logged
roverrat
Pardus Master
***
Posts: 236



View Profile
« Reply #5 on: July 07, 2007, 19:38:37 PM »

Hi Kavani,

the script that does all the magic is /sbin/update-grub. I had a look at it and compared it with update-grub on Ubuntu. The one in Pardus is written in Python (nor surprisingly  Wink) and is very basic. The one in Ubuntu is as bash shell script which is much longer and has lots more options.

I'm considering filing a bug report, so that hopefully the Pardus developers will make update-grub a bit more functional.

In the meantime  I'm considering hacking the pardus script so that it  will leave my windows default entry alone when the next kernel update comes... I then would have to make sure that the scripts itself doesn't get overwritten of course...
Logged
roverrat
Pardus Master
***
Posts: 236



View Profile
« Reply #6 on: July 09, 2007, 21:23:36 PM »

I filed a bug report (bug #6025)  at http://bugs.pardus.org.tr/. It's a known problem and after the 2007.2 release the developers will start working an a GUI tool to update/modify/add/remove grub entries, so that's good news.

I've adapted update-grub on my system (just a very quick&dirty hack). It will now leave the Windows entry in grub.conf at the top - where I've put it - and make new entries for new kernels below that. I've attached  the modified file in case you're interested (had to rename it to update-grub.txt in order to upload it...)


* update-grub.txt (2.08 KB - downloaded 51 times.)
Logged
Kavani
Guest
« Reply #7 on: July 10, 2007, 00:31:14 AM »

Thanks roverrat.
Logged
roverrat
Pardus Master
***
Posts: 236



View Profile
« Reply #8 on: July 10, 2007, 13:51:38 PM »

Hm, for some strange reason I'm only able to see the attached config file when I'm logged in.
As soon as I log out it's gone...
Logged
Kavani
Guest
« Reply #9 on: July 11, 2007, 00:21:54 AM »

That I believe has to do with the board's privacy settings.  I have the same thing happen to me.
Logged
roverrat
Pardus Master
***
Posts: 236



View Profile
« Reply #10 on: July 11, 2007, 14:46:22 PM »

I just noticed that in Pardus 2007.2 final there is a "Boot Manager" entry in Tasma under "System".
So it appears the developers already had it in the works  Wink
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!