adding recovery mode menu to grub
my grub menu contains upuntu, upuntu recovery mode, memtest1, memtest2, kupuntu. there is no menu to kupuntu recovery mode. how can i add it?
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu grub2 Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
it's UBUNTU and KUBUNTU, pronounced OO-BOON-TOO
http://
If you run:
gksudo gedit /etc/default/grub; sudo update-grub
Find this line:
GRUB_DISABLE_
and make it read:
#GRUB_DISABLE_
Then save the new file and close gedit, the grub update will run and you can now reboot to test.
You do know you don't need 2 seperate OSes to get KUbuntu and Ubuntu. You can install KDE on Ubuntu and simply choose your desktop when you log on. They are exactly the same OS under the hood so you are exactly duplicating the data twice in your storage
Revision history for this message
|
#2 |
thank you. it is safe to have two seperate os. i think so.
my problem is - first i created a (user or administrator?) account during installation named sadasiv. and then i created a user account named gohila. then i deleted sadasiv. now i do not have administrative previlages because i forgot the password. now i can login using gohila account. i cannot install other softwares.
Revision history for this message
|
#3 |
make a separate Question about "How to enable root account", here we try the grub issue.
Revision history for this message
|
#4 |
Please make the followings.
With a working ubuntu linux loged in with root account working do:
Give the result of
1) sudo fdisk -lu
2) ls -lah /dev/disk/by-uuid/
3) mkdir disk10
i remember this from the morning
4) sudo mount /dev/sda10 disk10
5) sudo ls -lah disk10/boot/
6) sudo cat sudo cat disk10/
Please separate each info with numbers 1), 2) as the commands.
Revision history for this message
|
#5 |
oops sorry
6) sudo cat disk10/
Revision history for this message
|
#6 |
Something more,
the grub2 (boot loader) in which hard disk is? /dev/sda1 ?
if so give also
7) sudo cat sudo cat /boot/grub/grub.cfg
Revision history for this message
|
#7 |
no, don't enable the root account. It isn't advised or needed
Boot to root recovery mode (Hold shift at boot, then select root) you can now run:
sudo adduser gohila admin
Reboot and gohila can now use sudo.
**ENABLING THE ROOT ACCOUNT IS REALLY DUMB AND WEAKENS SYSTEM SECURITY**
It's fine to have Ubuntu and Kubunto on seperate partitions but its kinda a waste of drive space but some puritans like to keep them seperate. No harm in it at all :)
Revision history for this message
|
#8 |
1)
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 39064547 19531250 83 Linux
/dev/sda2 39065598 488390655 224662529 5 Extended
/dev/sda5 97667072 273342563 87837746 b W95 FAT32
/dev/sda6 273346038 292977404 9815683+ b W95 FAT32
/dev/sda7 292980736 294004735 512000 83 Linux
/dev/sda8 294006784 488390655 97191936 8e Linux LVM
/dev/sda9 39065600 48830463 4882432 82 Linux swap / Solaris
/dev/sda10 48832512 97658879 24413184 83 Linux
Partition table entries are not in disk order
Disk /dev/sdb: 4022 MB, 4022337024 bytes
124 heads, 62 sectors/track, 1021 cylinders, total 7856127 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000341c1
Device Boot Start End Blocks Id System
/dev/sdb1 * 62 7849447 3924693 b W95 FAT32
2)
total 0
drwxr-xr-x 2 root root 180 2010-11-09 21:17 .
drwxr-xr-x 6 root root 120 2010-11-09 21:16 ..
lrwxrwxrwx 1 root root 10 2010-11-09 21:53 0D32-2C23 -> ../../sda6
lrwxrwxrwx 1 root root 11 2010-11-09 21:53 5569a52e-
lrwxrwxrwx 1 root root 10 2010-11-09 21:53 60F6-B330 -> ../../sdb1
lrwxrwxrwx 1 root root 10 2010-11-09 21:17 85a24926-
lrwxrwxrwx 1 root root 10 2010-11-09 21:53 8cef0f6e-
lrwxrwxrwx 1 root root 10 2010-11-09 21:53 B0BA-B303 -> ../../sda5
lrwxrwxrwx 1 root root 10 2010-11-09 21:17 f9ae0031-
5)
total 14M
drwxr-xr-x 3 root root 4.0K 2010-07-19 18:05 .
drwxr-xr-x 23 root root 4.0K 2010-08-31 21:43 ..
-rw-r--r-- 1 root root 626K 2010-04-16 18:31 abi-2.6.
-rw-r--r-- 1 root root 114K 2010-04-16 18:31 config-
drwxr-xr-x 2 root root 4.0K 2010-07-20 16:04 grub
-rw-r--r-- 1 root root 7.6M 2010-07-19 18:05 initrd.
-rw-r--r-- 1 root root 157K 2010-03-23 15:07 memtest86+.bin
-rw-r--r-- 1 root root 1.7M 2010-04-16 18:31 System.
-rw-r--r-- 1 root root 1.2K 2010-04-16 18:33 vmcoreinfo-
-rw-rw-rw- 1 root root 3.9M 2010-04-16 18:31 vmlinuz-
7)
DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
set saved_entry=
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z ${boot_once} ]; then
saved_
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 85a24926-
if loadfont /usr/share/
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 85a24926-
set locale_
set lang=en
insmod gettext
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=20
fi
### END /etc/grub.
### BEGIN /etc/grub.
set menu_color_
set menu_color_
### END /etc/grub.
### BEGIN /etc/grub.
menuentry 'Ubuntu, with Linux 2.6.32-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 85a24926-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.32-25-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 85a24926-
echo 'Loading Linux 2.6.32-25-generic ...'
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 85a24926-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
menuentry 'Ubuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 85a24926-
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Memory test (memtest86+)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 85a24926-
linux16 /boot/memtest86
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set 85a24926-
linux16 /boot/memtest86
}
### END /etc/grub.
### BEGIN /etc/grub.
menuentry "Ubuntu 10.04 LTS (10.04) (on /dev/sda10)" {
insmod ext2
set root='(hd0,10)'
search --no-floppy --fs-uuid --set 5569a52e-
linux /boot/vmlinuz-
initrd /boot/initrd.
}
### END /etc/grub.
### BEGIN /etc/grub.
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.
Revision history for this message
|
#9 |
6)
root@sadasivams
cat: disk12/
Revision history for this message
|
#10 |
ok, i am sorry i did not mean to be root, i mean you may be able to make sudo.
ok there are two methods to fix the problem
i know that your kubuntu is in /dev/sda10 please confirm if so.
Method1
edit your /etc/grub.
gksudo gedit /etc/grub.
and add the next lines:
-------
menuentry "Kubuntu Bootloader" {
set root=(hd0,10)
chainloader +1
}
-------
WITHOUT -------
Save the file and reboot.
Normally now you will see an entry to your Grub2 that will lead you to boot loader of kubuntu on sda10.
if you dont have a bootloader in /dev/sda10 we will go to method1
Revision history for this message
|
#12 |
if the previous does not work
make steps until
gksudo gedit /etc/grub.
remove previous lines
add these lines
-------
menuentry 'KUbuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,10)'
search --no-floppy --fs-uuid --set ec6cbb9c-
echo 'Loading Linux 2.6.32-21-generic ...'
linux /vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /initrd.
}
-------
WITHOUT -------
Save and reboot you must be ok!
Revision history for this message
|
#13 |
i forgot one step,
after save the file in any method
run
sudo update-grub
and then reboot
if i did not catch you early, you can do it now the /etc/grub.
if method1 does not work
make method2
sudo update-grub
reboot
Grub must be ok, and you can boot in Kubuntu.
Revision history for this message
|
#14 |
i must go, normally you must be ok. I will be available tommorow.
Revision history for this message
|
#15 |
method 1 : invalid signature
method 2: file not found
Revision history for this message
|
#17 |
i am happy to give you solutions. Now you also know some things to help others.
Have a nice continue to Linux world!
Revision history for this message
|
#18 |
with this method you can boot also your other distro, fedora.
we must know the partition /dev/sdaX
the uuid of partition
and the contents of /boot/ of /dev/sdaX
Revision history for this message
|
#19 |
my problem is not solved.
method1: invalid signature
method2: ec....04 file not found.
load the kernel first
Revision history for this message
|
#20 |
ok leave method1
sudo mount /dev/sda10 disk10
Please give the output:
1) sudo mount /dev/sda10 disk10
2) sudo ls -lah disk10/boot/
3) sudo cat /etc/grub.
Revision history for this message
|
#21 |
2)
sadasivams@
total 14M
drwxr-xr-x 3 root root 4.0K 2010-07-19 18:05 .
drwxr-xr-x 23 root root 4.0K 2010-08-31 21:43 ..
-rw-r--r-- 1 root root 626K 2010-04-16 18:31 abi-2.6.
-rw-r--r-- 1 root root 114K 2010-04-16 18:31 config-
drwxr-xr-x 2 root root 4.0K 2010-07-20 16:04 grub
-rw-r--r-- 1 root root 7.6M 2010-07-19 18:05 initrd.
-rw-r--r-- 1 root root 157K 2010-03-23 15:07 memtest86+.bin
-rw-r--r-- 1 root root 1.7M 2010-04-16 18:31 System.
-rw-r--r-- 1 root root 1.2K 2010-04-16 18:33 vmcoreinfo-
-rw-rw-rw- 1 root root 3.9M 2010-04-16 18:31 vmlinuz-
3)
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'KUbuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root = '(hd0,10)'
search --no-floppy --fs-uuid --set ec6cbb9c-
echo 'Loading Linux 2.6.32-21-generic ...'
linux /vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /initrd.
}
Revision history for this message
|
#22 |
edit the /etc/grub.
1) gksudo gedit /etc/grub.
remove old lines and enter these:
-------
menuentry 'KUbuntu, with Linux 2.6.32-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,10)'
search --no-floppy --fs-uuid --set ec6cbb9c-
echo 'Loading Linux 2.6.32-21-generic ...'
linux /boot/vmlinuz-
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.
}
-------
WITHOUT -------
save the file
2) sudo update-grub
reboot, you must be ok now.
The problem was that i copy my menuentry but i had a /boot partition. You have only one partition for each distro
so i change the lines
form
linux /vmlinuz-
initrd /initrd.
to
linux /boot/vmlinuz-
initrd /boot/initrd.
Revision history for this message
|
#23 |
not working .
may i know the details about
ec6cbb9c-
Revision history for this message
|
#24 |
this is an id of grub2 for file system i think. Like uuid of disks. But i think there is no importance for this.
i dont know how to generate this. The ec6cbb9c-
Revision history for this message
|
#25 |
try to remove --fs-uuid --set ec6cbb9c-
save
sudo update-grub
reboot
Revision history for this message
|
#26 |
with the lines
linux /boot/vmlinuz-
initrd /boot/initrd.
are you sure that is not working?
what error gives you?
Revision history for this message
|
#27 |
file not found
load the kernel first
Revision history for this message
|
#28 |
i think the config file is correct.
you have the right files from disk10/boot
-rw-r--r-- 1 root root 7.6M 2010-07-19 18:05 initrd.
-rw-rw-rw- 1 root root 3.9M 2010-04-16 18:31 vmlinuz-
linux /boot/vmlinuz-
initrd /boot/initrd.
and the right UUID, 5569a52e-
lrwxrwxrwx 1 root root 11 2010-11-09 21:53 5569a52e-
So normally all are OK.
The only thing is to have an old BIOS
I copy from https:/
-------
1) File Not Found (Error 15)
This error is the result of a GRUB 2 installation to /boot but a Master Boot Record ( MBR ) which still contains Grub legacy. This can happen if you don't select your drive when running sudo upgrade-
To recover from this error, GRUB 2 must be reinstalled. Go to Reinstalling from the LiveCD for instructions.
2) Grub shows rescue prompt (and does not continue to boot)
You may have a buggy bios and the location of your /boot/* files is not under the 1024 cylinder boundary.
-------
If this is the case i suggest to save your personal data and make a normall installation without many partitions for each Graphical enviroment.
You can install a Ubuntu system and after install the KDE inside Ubuntu.
When you will be in login screen you will choose the session you prefer Gnome/KDE.
There is no need to have Ubuntu and Kubuntu separated. It is the same system.
I dont know further to help you. I made my best.
Revision history for this message
|
#29 |
install KDE from synaptic not live cd Kubuntu.
Revision history for this message
|
#30 |
Like actionparsnip, I think it would be easier to have a single OS and two window managers.
If you like to continue into dual boot way, could you tell me if you use same version for Kubuntu and Ubuntu (e.g. 10.10) , and if not what version for each of them ?
Revision history for this message
|
#31 |
wait your Kubuntu boots normally eh?
if you do a
sudo cat /boot/grub/grub.cfg | less
you will see a menuentry like
menuentry 'Kubuntu ....
copy this menuentry to your /etc/grub.
but change only the line
from like
linux /vmlinuz-
cb0b68f5b ro quiet splash
linux /boot/vmlinuz-
that means change the "quite slpash" to "single" this is the recovery mode.
do not change /boot/grub/grub.cfg
change /etc/grub.
save
sudo update-grub
reboot
i dont know anything else!
Revision history for this message
|
#32 |
to delance:
10.04 both
to actionparsnip:
i decided to follow your idea.
to demosthenesk:
thank you for continuous effort.
Revision history for this message
|
#33 |
So both use Grub2, which will avoid chaining boot loader.
I think you should create a partition dedicated to /boot, and shared by all Unixes using Grub Legacy and Grub2. In your case, you only have Grub2, which is better.
Each time update-manager install a new kernel, it will modify "/boot".
MBR in first sector of disk point directly to "/boot", but if you have two "/boot", one by OS, it's difficult to know which one is used. So you could boot Kubuntu with "/boot" of Ubuntu or you could boot Ubuntu with "/boot" of Kubuntu. This will make situation un-manageable.
After creating this partition, you will have to run "sudo update-grub". I advise you to run at least one time for all installed Unixes.
Can you help with this problem?
Provide an answer of your own, or ask sadasivam for more information if necessary.