Help needed

Asked by Halaliel

I have Ubuntu 9.04 NBR on SSD main boot.

Just installed Ubuntu 9.10 on SD card & not on SSD.

Now has a problem & can't boot from SSD anymore.

Can multi boot with SD card plugged in though.

I want to normal boot 9.04 from SSD as before or I want to boot 9.10 from SD to experiment.

How do I fix this boot problem to work the way I wanted ?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub Edit question
Assignee:
No assignee Edit question
Solved by:
Halaliel
Solved:
Last query:
Last reply:
Revision history for this message
Tom (tom6) said :
#1

HI :)

Can you boot into an Ubuntu session at all somehow? Can you bootup from usb-stick or something? If so then get to a command-line
https://help.ubuntu.com/community/UsingTheTerminal#Starting%20a%20Terminal
and type in

sudo grub

find /boot/grub/stage1

and paste the output back into here. Note that sudo will ask for your normal user password, not your Superuser/Root one, and it wont give you any stars while you type - this prevents people finding out how long your password is in an automated attack of some kind. Then just type in

quit

sudo fdisk -l

where " -l" is a lower-case " -L" and give us the output from that too and hopefully we should be able to help you better from there using this guide
https://help.ubuntu.com/community/WindowsDualBoot#Recovering%20GRUB%20after%20reinstalling%20Windows

Good luck and regards from
Tom :)

Revision history for this message
Halaliel (halaliel) said :
#2

Going back to previous statement.

Ubuntu 9.04 SSD boots OK
Ubuntu 9.10 SDC boots OK

Undesirably though it Is booting as a multi-boot screen as only while SD card with 9.10 is plugged in.

I can unplug SD card when working in 9.04 fine, no problem.

The desired way I wanted to boot was to boot normal as before as SSD boots with 9.04

Wanted to boot with option F12 to boot 9.10 from SD card to experiment & get the bugs reports going for us Acer Aspire One users. I like my AAO & Ubuntu NBR never going back to Windows LOL.

As is when SD card with 9.10 is not plugged in it can't boot I get a command prompt I know nothing to do with.

Does anyone know what to enter on command line ?

Is there a way to fix the multi-boot easy so I will boot like I wanted it to ?

Should I do a total re-install as is no other way ?

Revision history for this message
Tom (tom6) said :
#3

HI :)

I think you need only edit the /boot/grub/menu.lst file to make sure that the menu.lst on the ssd drive gives an option for booting into the Ubuntu on the SD-card - obviously when the SD-card isn't there then choosing this menu item will just produce an error and then go back to the boot menu.

Alternatively you might be able to mess around in the bios to change the boot-order to make the machine look for an SD-Card to boot from before it looks for internal hard-drives. This seems to be the option you are looking for. Err, this guide has something fairly close to what you are looking for although it's meant to change the bios to look for a Cd-drive first rather than an SD-Card but the principle is roughly the same
https://help.ubuntu.com/community/BootFromCD#BIOS%20is%20not%20set%20to%20boot%20from%20CD%20or%20DVD%20drive

Good luck and regards from
Tom :)

Revision history for this message
Halaliel (halaliel) said :
#4

Disk /dev/sda: 16.0 GB, 16001269760 bytes
255 heads, 63 sectors/track, 1945 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xffffffff

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 1858 14924353+ 83 Linux
/dev/sda2 1859 1945 698827+ 5 Extended
/dev/sda5 1859 1945 698796 82 Linux swap / Solaris

Disk /dev/sdb: 8017 MB, 8017936384 bytes
255 heads, 63 sectors/track, 974 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000643a9

   Device Boot Start End Blocks Id System
/dev/sdb1 1 926 7438063+ 83 Linux
/dev/sdb2 927 974 385560 5 Extended
/dev/sdb5 927 974 385528+ 82 Linux swap / Solaris

Revision history for this message
Halaliel (halaliel) said :
#5

This is an Acer Aspire One, the BIOS allows you to boot anything & anyway & any order you desire to.

BIOS Boot priority is 1. SSD, 2. SDc, 3. CD/DVD, 4. Network, 5. Floppy.
 Option F2 selects BIOS setup &
 F12 allows you to select a boot.

AAO will boot from SSD / SDc card no worry as this is the way to install / run new OS or even install any OS on SD card to boot from no problem.

As said before it boots fine by any way selected, is trying to figure out the info by way of links you gave. I merely want to boot from SSD 9.04 as normal it did before & / or use F12 to boot from experimental SDC 9.10.

I have the terminal open now still & is trying to figure out if I can edit the GRUB loader. If so that is good, & yet bad as I'm not sure what to do this is very vague & confusing. Multi-boot as it is just undesirable now.

Revision history for this message
Tom (tom6) said :
#6

HI :)

I think you are asking to have the Ubuntu boot menu give you a choice between booting up the version on the SD-Card and the version on the hard-drive but only when the SD-Card is in?

When the SD-Card isn't in you don't want it to give the option of trying to boot from the SD-Card?

If that's true then you will need to setup the boot-order in the bios to boot from SD-Card first.
https://help.ubuntu.com/community/BootFromCD#BIOS%20is%20not%20set%20to%20boot%20from%20CD%20or%20DVD%20drive

Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#7

Hi again :)

Ok forget editing the menu.lst. Just close the terminal and reboot the machine to get into the bios and chagne the boot order from

BIOS Boot priority is 1. SSD, 2. SDc, 3. CD/DVD, 4. Network, 5. Floppy.

to

BIOS Boot priority is 1. SDc, 2. SSD, 3. CD/DVD, 4. Network, 5. Floppy.

Ok? Does that sort the problem out?
Regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#8

Oooo, actually it would be even better to change it to

BIOS Boot priority is 1. SDc, 2. CD/DVD, 3. SSD, 4. Network, 5. Floppy.

but as long as the SDc is the first thing then that's all that really matters right now :)

Revision history for this message
Halaliel (halaliel) said :
#9

You are on right track with this > " I think you need only edit the /boot/grub/menu.lst file to make sure that the menu.lst on the ssd drive gives an option for booting into the Ubuntu on the SD-card - obviously when the SD-card isn't there then choosing this menu item will just produce an error and then go back to the boot menu. "

Now since I know nothing about editing the GRUB loader & hopes you do can you be be patient with me here to help me understand what to do?

halaliel@halaliel-laptop:~$ /boot/grub/menu.lst
bash: /boot/grub/menu.lst: Permission denied

Thank you for helping me, I do appreciate it.

Revision history for this message
Tom (tom6) said :
#10

OK, now when you boot into Ubuntu open a command-line and type in

sudo grub

root (hd0,0)

setup (hd0)

quit

Now when you reboot without the SD-Card it should boot into the internal hard-drive, the SSD install of Ubuntu?
Good luck and regards from
Tom :)

Revision history for this message
Tom (tom6) said :
#11

Errr, this is getting quite confusing. Lets have a look at the menu.lst for the drive you are booted into at the moment. To do this get to a command-line and type in

cd /boot/grub
ls
sudo cp menu.lst menu.lst-270809
ls
gedit menu.lst

Note the "ls" is a lower-case "LS" and shows a LiSt of what's in the folder. The "sudo" command will ask for your normal user password, not your Superuser/Root one. It doesn't show any stars as you type in order to keep even the length of your password a secret. The "cp" command doesn't usually need sudo in front of it but "menu.lst" is a system file in a system folder so it is all quite carefully protected. Note the "menu.lst" is a lower-case "MENU.LST". The 2nd "ls" command should show you have made a backup copy of menu.lst and called it "menu.lst-070809". Gedit is a small text-editor. Please just copy&paste the contents of menu.lst from the gedit window into here.

Thanks, good luck and regards from
Tom :)

Revision history for this message
Halaliel (halaliel) said :
#12

Boot order must be the SSD 9.04 only as it will not boot period if Boot order is changed to anything else here now.

Results:

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=50fa4050-cfbb-44de-a019-f75fb11f8909 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=50fa4050-cfbb-44de-a019-f75fb11f8909

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 9.04, kernel 2.6.28-15-generic
uuid 50fa4050-cfbb-44de-a019-f75fb11f8909
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=50fa4050-cfbb-44de-a019-f75fb11f8909 ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode)
uuid 50fa4050-cfbb-44de-a019-f75fb11f8909
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=50fa4050-cfbb-44de-a019-f75fb11f8909 ro single
initrd /boot/initrd.img-2.6.28-15-generic

title Ubuntu 9.04, kernel 2.6.28-14-generic
uuid 50fa4050-cfbb-44de-a019-f75fb11f8909
kernel /boot/vmlinuz-2.6.28-14-generic root=UUID=50fa4050-cfbb-44de-a019-f75fb11f8909 ro quiet splash
initrd /boot/initrd.img-2.6.28-14-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-14-generic (recovery mode)
uuid 50fa4050-cfbb-44de-a019-f75fb11f8909
kernel /boot/vmlinuz-2.6.28-14-generic root=UUID=50fa4050-cfbb-44de-a019-f75fb11f8909 ro single
initrd /boot/initrd.img-2.6.28-14-generic

title Ubuntu 9.04, kernel 2.6.28-13-generic
uuid 50fa4050-cfbb-44de-a019-f75fb11f8909
kernel /boot/vmlinuz-2.6.28-13-generic root=UUID=50fa4050-cfbb-44de-a019-f75fb11f8909 ro quiet splash
initrd /boot/initrd.img-2.6.28-13-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-13-generic (recovery mode)
uuid 50fa4050-cfbb-44de-a019-f75fb11f8909
kernel /boot/vmlinuz-2.6.28-13-generic root=UUID=50fa4050-cfbb-44de-a019-f75fb11f8909 ro single
initrd /boot/initrd.img-2.6.28-13-generic

title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid 50fa4050-cfbb-44de-a019-f75fb11f8909
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=50fa4050-cfbb-44de-a019-f75fb11f8909 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid 50fa4050-cfbb-44de-a019-f75fb11f8909
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=50fa4050-cfbb-44de-a019-f75fb11f8909 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Ubuntu 9.04, memtest86+
uuid 50fa4050-cfbb-44de-a019-f75fb11f8909
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

Revision history for this message
Halaliel (halaliel) said :
#13

grub> root (hd0,0)

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 17 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

grub>

Revision history for this message
Tom (tom6) said :
#14

Ok, that clearly has no options for boting into 9.10 so lets look at the menu.lst of the other drive. On a command-line try

cd /media/disk/boot/grub
ls
sudo cp menu.lst menu.lst-270809
ls
gedit menu.lst

and copy&paste into here all the stanzas that look a bit like this

title Ubuntu 9.04, kernel 2.6.28-15-generic
uuid 50fa4050-cfbb-44de-a019-f75fb11f8909
kernel /boot/vmlinuz-2.6.28-15-generic root=UUID=50fa4050-cfbb-44de-a019-f75fb11f8909 ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
quiet

The uuid numbers will be different for some of them, and so will the kernel numbers. The initrd numbers always match the kernel numbers :)
Ok, good luck and regards again from
Tom :)

Revision history for this message
Tom (tom6) said :
#15

Hmmm, since booting from the SDc seeems problematic it might be worth trying to sort that out & then get the SSd's grub back too. On a command-line try this

sudo grub

find /boot/grub/stage1

root (hd1,0)

setup (hd1)

root (hd0,0)

setup (hd0)

quit

Note that when you enter the "sudo grub" it gives you a different command-line from the normal one. This is the special command-line for Grub itself and it does behave a little bit differently from the normal one. The "find" command should give the output " (hd(0,0) hd(1,0)" which shows us that there are 2 grubs (GRand Unified Boot-loader) installed on your machine. Grub talks to machines more than people so it numbers things to help the machine find them more easily. This is why it starts counting at 0 whereas we start at 1. Also it replaces letters with numbers. So sda1 in linux becomes (hd0,0) in grub and sdb1 becomes (hd1,0). In the first section i am hoping that setting up the grub on SDc (sdb in linux or (hd1) in grub) will mean that you can change the boot order as i suggested previously to allow the machine to boot up from the SDc into either version of Ubuntu. That could create a problem for Ubuntu on the internal hard-drive (sda in linux or (hd0) in grub) so the last part is to re-establish sda1, the SSD internal drive as the main one with the best grub :) The "quit" command puts us back on a linux command-line and closes grub for us.

I hope this help!
Good luck and regards from
Tom :)

Revision history for this message
Halaliel (halaliel) said :
#16

Ok wonder of Wonders the previous instruction you gave got me back on track to boot from SSD normally.

Now I switch to boot from SDc slot from F12 & only get a flashing _ & dead stops there.
Hit power switch & boots normal again.

So now to try above instructions you just gave hopes this will still boot then.

Wish me luck or I'll send you a gun to my head smiley LOL
This is getting confusing, HA HA !

Revision history for this message
Halaliel (halaliel) said :
#17

grub> find /boot/grub/stage1
 (hd0,0)

grub> root (hd1,0)

grub> setup (hd1)
 Checking if "/boot/grub/stage1" exists... no
 Checking if "/grub/stage1" exists... no

Error 15: File not found

grub> root (hd0,0)

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 17 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.

Looks like maybe I'll have to pull out the SSD to install 9.10 to SDc via DVD. I don't see an easy way other.

Revision history for this message
Halaliel (halaliel) said :
#18

OK after trying & all did not work. I simply removed SSD to install 9.10 on SDc. I had succcess this way as Ubuntu forces a multi-boot with both drives plugged in.

Now is able to boot from SSD normally or use F12 to boot from SDc nice & easy now.

Revision history for this message
Tom (tom6) said :
#19

Brilliant :))) Nicely done :)))
Welcome to linux-land, especially the Ubuntu corner.
Problems are not usually quite that confusing but occasionally one like that or even more rarely something even worse crops up. It's nice that it is so easy to edit system-files by just using a text-editor.

Good luck and regards from
Tom :)