Xubuntu 8.04 - edit grub
I have an old version of Xubuntu on an old laptop with an old version of grub without an internet connection.
Now I would like to edit grub. So I tried: Code:
sudo su Code:
gedit /boot/grub/menu.lst Code:
apt-get install gedit I guess the final bit of terminal command is to: Code:
update-grub Nevertheless it takes me back to the good old days of 2008 when I first found Linux, then wanting to completely make a break from the Microsoft empire. Sadly I am still in prison, but hopefully in the not too distant future we will all be able to free ourselves from Darth Vader and his evil empire. |
you need to check what kind of editor you have on old xubuntu, you surely can't install one without internet connection!
|
I am not sure what the editor is in 8.04; mousepad?!
Is there any way that I can download the right file or application from another computer to a usb and install it that way to get gedit or anything else that might work? |
On Xubuntu you should have Mousepad and Nano installed, possibly also Vi or Vim. Any of these should be sufficient to edit the menu.lst file.
Xubuntu 8.04 used Grub 0.97, so the update-grub command is not needed. |
OK, so do you know what I should type into the terminal in terms of commands to edit grub?
N.B. I don't have an internet connection with this particular laptop. |
Sorry, I was mistaken, the default editor for Xubuntu is Leafpad, not Mousepad.
Try it with Code:
sudo nano /boot/grub/menu.lst Code:
sudo leafpad /boot/grub/menu.lst |
If you're able to boot your computer and use an editor, then I'm not sure why you want to edit the menu.lst
Debian-based distros have complicated menu.lst files so they can be automatically updated when you update the system and a new kernel is installed. If you have no internet you can't update, so all the stuff at the beginning is of no use to you. I suggest saving the old menu.lst for reference Code:
cd /boot/grub Code:
sudo mousepad /boot/grub/menu.lst Code:
# menu.lst 1 I have assumed that Xubuntu is on partition sda1. If not, change accordingly. 2 Your kernel version will not be as above, and you will have to get the correct version from the /boot directory. 3 The initrd.img version must match the kernel version 4 If you have another distribution in sda2, you can add: Code:
title Ubuntu maverick or whatever kernel 2.6.35-22-generic Hope you'll be able to get a newer OS on a newer computer soon. |
Many thanks for your advice. It was just a question of changing the text editor from gedit to mousepad:
Code:
sudo mousepad /boot/grub/menu.lst All I wanted to do is change the boot order so that XP comes up first on menu.lst followed by all the Xubuntu entries which I changed to place under 'Other Operating Systems' (normally for Windows XP). I don't know if this is the technically correct way to do it because of subsequent entries by grub itself, but my task has been completed. This is only a spare laptop and will not contain any important information. I just want to go through an Ubuntu book and practice on the Xubuntu partition. At the same time if I remember correctly grub is easier to amend contrasted with grub2. |
Quote:
Code:
default 0 Or you can cut and paste the entries to get them in the order you want. |
Quote:
Code:
## ## End Default Options ## Code:
### END DEBIAN AUTOMAGIC KERNELS LIST |
You are correct but:
Quote:
|
I don't think this partition will ever make it on to the internet. It is on a laptop that can take max. 160MB RAM! I don't understand the default as 0? Is XP now 0?
This is my current setup (I just copied and pasted grub onto a usb...): Code:
# menu.lst - See: grub(8), info grub, update-grub(8) |
Yes, that should work. Give it a try.
I'd get rid of the uncommented (no #) lines: Code:
title Other operating systems: |
OK. Many thanks for all your help.
It's all working fine now. :) |
All times are GMT -5. The time now is 10:20 AM. |