LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-28-2005, 10:29 PM   #1
zeroz52
Member
 
Registered: Feb 2005
Distribution: Slackware 10.2
Posts: 121

Rep: Reputation: 15
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.

 
Old 02-28-2005, 10:56 PM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 56
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.
 
Old 02-28-2005, 10:59 PM   #3
Tuvok
Member
 
Registered: Mar 2003
Distribution: FreeBSD 6.1, NetBSD 3.0.1
Posts: 170

Rep: Reputation: 30
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
 
Old 02-28-2005, 11:06 PM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
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
 
Old 02-28-2005, 11:09 PM   #5
zeroz52
Member
 
Registered: Feb 2005
Distribution: Slackware 10.2
Posts: 121

Original Poster
Rep: Reputation: 15
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.
 
Old 02-28-2005, 11:14 PM   #6
zeroz52
Member
 
Registered: Feb 2005
Distribution: Slackware 10.2
Posts: 121

Original Poster
Rep: Reputation: 15
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
 
Old 03-01-2005, 05:31 AM   #7
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
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:
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
but modify (if needed) the kernel version with the one Xandros have (like vmlinuz-2.6.7-386, don't know for sure). The rest (savedefault and boot) remains unaltered.
 
Old 03-01-2005, 07:56 AM   #8
zeroz52
Member
 
Registered: Feb 2005
Distribution: Slackware 10.2
Posts: 121

Original Poster
Rep: Reputation: 15
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
 
Old 03-01-2005, 08:26 AM   #9
0pal_t0ad
Member
 
Registered: Feb 2004
Location: Southampton, England
Distribution: Laptop:Gentoo-i686-2.6.9-r9 Desktop:Slackware10 2.4.26
Posts: 298

Rep: Reputation: 30
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).
 
Old 03-01-2005, 08:30 AM   #10
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
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.
 
Old 03-01-2005, 10:10 AM   #11
zeroz52
Member
 
Registered: Feb 2005
Distribution: Slackware 10.2
Posts: 121

Original Poster
Rep: Reputation: 15
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.
 
Old 03-01-2005, 11:03 AM   #12
0pal_t0ad
Member
 
Registered: Feb 2004
Location: Southampton, England
Distribution: Laptop:Gentoo-i686-2.6.9-r9 Desktop:Slackware10 2.4.26
Posts: 298

Rep: Reputation: 30
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.
 
Old 03-01-2005, 05:29 PM   #13
zeroz52
Member
 
Registered: Feb 2005
Distribution: Slackware 10.2
Posts: 121

Original Poster
Rep: Reputation: 15
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
 
Old 03-01-2005, 05:30 PM   #14
zeroz52
Member
 
Registered: Feb 2005
Distribution: Slackware 10.2
Posts: 121

Original Poster
Rep: Reputation: 15
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 #
 
Old 03-01-2005, 06:00 PM   #15
rsmith
Member
 
Registered: Jan 2005
Location: Arizona
Distribution: SuSE 9.3 Pro / Slackware 10.1 / WBEL 3
Posts: 57

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Edit the Grub.conf reply2vinay Linux - Hardware 1 07-26-2005 09:38 AM
I cannot edit grub.conf file!! Azzath Linux - Software 3 03-23-2005 02:00 PM
[SOLVED] How to edit grub.conf filosophem Red Hat 4 02-07-2004 03:04 AM
How to edit grub.conf file? hnash53 Linux - Software 1 12-12-2003 12:33 AM
Edit grub.conf NoviceW Linux - General 1 11-11-2003 05:51 PM


All times are GMT -5. The time now is 07:21 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration