Change Grub (1) default settings.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
szamot83
Level 2
Level 2
Posts: 66
Joined: Wed Jul 23, 2008 9:33 am

Change Grub (1) default settings.

Post by szamot83 »

Hello,

I was wondering if it is possible to change grub default settings. After installing Linux Mint I have always setting my own kernel options, which are:
1 delete "splash" word
2 add "ipv6.disable=1"
3 add "vga=791"
4 change root from /sda1 to sdb1

Every time I upgrade kernel my settings are deleted and "update grub" is setting this to it's own default settings.
Could you tell me, where I can find those settings? I want to change them, and I don't know how.
I'm not searching for ready-made solution. Maybe you could tell me where to search?

Best Regards

P.S. Sorry for my English.

User avatar
DrHu
Level 17
Level 17
Posts: 7525
Joined: Wed Jun 17, 2009 8:20 pm

Re: Change Grub (1) default settings.

Post by DrHu »

szamot83 wrote:4 change root from /sda1 to sdb1
I don't know why that is happening, since grub should know the boot partition you are using for Linux Mint..

Just use the /boot/grub/menu.lst settings from the previous kernel, except of course the version number/kernel load selection is being added as the first grub menu entry to allow booting with the newly updated kernel.

It is a simple matter of copy and paste the extra settings you use, from the last kernel before the updated one was installed by grub
--another way to do this is keep a sticky note (or a gedit(mint menu text editor) *.txt file)) on the desktop or elsewhere in your file system (under /home/..) with your kernel settings and copy and paste after the kernel name, when grub has added the new kernel version

You will have to be root to edit /boot/grub/menu.lst file
in the nautilus file manager, Open as root the /boot/grub directory (folder), and proceed with the modification of that kernel line for that new kernel version..

If you wanted to get clever, you could use sed to edit and change the /boot/grub/menu.lst selection from a script, to replace that kernel line with the additions you wanted
--but for the normal user, copy and paste, even if it takes a few steps or mouse clicks will be easier..
Last edited by DrHu on Fri Nov 13, 2009 8:36 pm, edited 1 time in total.

szamot83
Level 2
Level 2
Posts: 66
Joined: Wed Jul 23, 2008 9:33 am

Re: Change Grub (1) default settings.

Post by szamot83 »

sticky note (or a gedit(mint menu text editor) *.txt file)) on the desktop or elsewhere in your file system (under /home/..) with your kernel settings and copy and paste after the kernel name, when grub has added the new kernel version
I'm doing this in this way now, but I was wandering if there is a way to automate this process.

I must change root partition because I have added new disk to my PC (sda).

User avatar
grimdestripador
Level 6
Level 6
Posts: 1051
Joined: Fri Feb 16, 2007 2:26 am

Re: Change Grub (1) default settings.

Post by grimdestripador »

DrHu wrote:
szamot83 wrote:4 change root from /sda1 to sdb1
I don't know why that is happening, since grub should know the boot partition you are using for Linux Mint..
On my system i have IDE, SATA, and SATA-RAID (onboard promise). Each time I install with more than 1 disk connected, Linux detects partitions in a different order than GRUB. even when boot record is written to /dev/sda1 specifically. This has been occuring since LM6 or so, and for this reason I have become more or less comfortable with busybox and grub command line. I could go on, but this isn't a bug report. If someone actually wants to fix this I can give detailed data.

User avatar
grimdestripador
Level 6
Level 6
Posts: 1051
Joined: Fri Feb 16, 2007 2:26 am

Re: Change Grub (1) default settings.

Post by grimdestripador »

grimdestripador wrote:
DrHu wrote:
szamot83 wrote:4 change root from /sda1 to sdb1
I don't know why that is happening, since grub should know the boot partition you are using for Linux Mint..
On my system i have IDE, SATA, and SATA-RAID (onboard promise). Each time I install with more than 1 disk connected, Linux detects partitions in a different order than GRUB. even when boot record is written to /dev/sda specifically and root partition is /dev/sda1 the actualy bootloader ends up on /dev/sde or IDE0. This has been occurring since LM6 or so, and for this reason I have become more or less comfortable with busybox and grub command line. I could go on, but this isn't a bug report. If someone actually wants to fix this I can give detailed data.

reaZon
Level 2
Level 2
Posts: 60
Joined: Mon Oct 26, 2009 8:48 am
Location: Egypt

Re: Change Grub (1) default settings.

Post by reaZon »

i think a dedicated GRUB partition can give you that.kernel revisions wont mess with your menu if that is what you want.
DataMan has posted a link about making a dedicated GRUB partition before.here is it http://www.boomerclan.info/techpaperslx ... ition.html.
if you think the other way to automate it with sed.i think i can help with that :D .

Post Reply

Return to “Installation & Boot”