How to edit grub.conf?
Sorry for the stupid question. I have Ubuntu as my primary OS and need to edit the grub.conf to see xandros. With what do I edit it with. I tied opening it with Office, but it was read only. Please help. Thanks alot for any and all help.
:newbie: |
If it's read only, that probably means you tried it as a regular user.
To run things as the root user ( adminitrator ) you will need to know the password. Type: su - Enter the root password As the root user, type: kwrite /boot/grub/grub.conf to edit the file. |
Open terminal, login as root, and edit it with vi. Like this:
vi grub.conf It might be easier to use gedit. Like this: gedit grub.conf |
You need to have root privileges. Easiest is to open a root terminal in gnome. You will be prompted for your password.
If you're familiar with vi, emacs etc, you can now use those without the warning about readonly. If you prefer an editor with a gui, type gedit filename (ignore the warning you get) or just gedit and browse to the file to edit. BTW which version of Ubuntu are you using. I'm using Warty and don't have grub.conf, but menu.lst |
Wim, you rock. And thanks to evryone else who replied. Wim, I have warty too, and have been having troubles finding a grub.conf that doesn't exist thanks all.
|
I can use this and seems to allow me to edit, but none of the suggestions you all had. ???
nano /boot/grub/menu.lst But not sure what I need to edit to get my other distro to install.? Anyone. root (hd0,0) kernel /boot/vmlinuz-2.6.8.1-5-386 root=/dev/hda1 ro quiet splash initrd /boot/initrd.img-2.6.8.1-5-386 savedefault boot title Ubuntu, kernel 2.6.8.1-5-386 (recovery mode) root (hd0,0) kernel /boot/vmlinuz-2.6.8.1-5-386 root=/dev/hda1 ro single initrd /boot/initrd.img-2.6.8.1-5-386 savedefault boot title Ubuntu, kernel 2.6.8.1-3-386 root (hd0,0) kernel /boot/vmlinuz-2.6.8.1-3-386 root=/dev/hda1 ro quiet splash initrd /boot/initrd.img-2.6.8.1-3-386 savedefault boot title Ubuntu, kernel 2.6.8.1-3-386 (recovery mode) root (hd0,0) kernel /boot/vmlinuz-2.6.8.1-3-386 root=/dev/hda1 ro single initrd /boot/initrd.img-2.6.8.1-3-386 savedefault boot title Memory test root (hd0,0) kernel /boot/memtest86+.bin ### END DEBIAN AUTOMAGIC KERNELS LIST |
Copy and paste one of the command sequences already existent, replacing "root(hd0,0)" with the appropriate HD/partition Xandros resides in. If, for example, Xandros is found on a 2nd HD, replace it with "root(hd1,0)". If, instead, is on the same hard-disk but on the 3rd partition, replace with "root(hd0,2)". These are only examples, finding the correct one is up to you.
Also, keep the lines Quote:
|
thanks a lot I will give that a try. If Xandros were to get update to a new kernel after I set it up do i need to reedit the kernel version? Just curious, cause I have 2 kernel versions of Ubuntu I can choose to boot into.
Thanks again |
you should boot into ubuntu, then mount your xandros partition to see what the kernel name is. or better yet, copy everything in the boot config for xandros(i'm guessing xandros is another linux distro).
|
Don't know about Xandros. I can speak for Debian which, if you get a newer kernel version using their repositories, will automagically add the proper entry in menu.lst.
If, however, that doesn't work in Xandros or you compile your own kernel, there should be no big deal. Just add another command sequence like the previous ones, taking care to modify only the version number (if the new kernel will stay in its regular place such as /boot; otherwise change that too). And one more thing: after getting a newer kernel (no matter how), keep the old one as well at least for a period of time to make sure everything is working fine with the new version. This way you can always boot safely with the old one to make the right adjustments. |
Thanks for all of the replies, you all have been very helpful and it is appreciated. To mount the Xandros distro to see what kernel version it is do I type as root: mnt /dev/hda4 ? Xandros is on hda4. Do I need to issue another command after mounting it to get the kernel info? Thanks alot, I am a n00b to linux but have learned a lot in the last week thanks to everyone on this forum. you guys and gals are great. I no longer even have Windows XP on my computer. :D
|
yeah. 'mkdir /mnt/xandros' and 'mount /dev/hda4 /mnt/xandros'
you can do without the mkdir part if you have a dir/folder to mount it to already. |
sorry to bug you all once more. When i type: (after i did mkdir /mnt/xandros)
mount /dev/hda4 /mnt/xandros I get this: root@ubuntu:/home/boots # mount dev/hda4 /mount/xandros mount: you must specify the filesystem type root@ubuntu:/home/boots # Anyone? What did i do wrong? Thanks again :newbie: |
By the way i get this when trying again, so i must have mounted it correctly.
root@ubuntu:/home/boots # mkdir /mnt/xandros mkdir: cannot create directory `/mnt/xandros': File exists root@ubuntu:/home/boots # |
If it's stating that you need to specify a filesystem type you need to add the -t <filesystem used on the mount> I.E. -t ext2 or -t jfs etc. etc. Good luck.
|
All times are GMT -5. The time now is 04:54 PM. |