1

I have one old pc that Windows XP even got performance problems in time that caused me to give one lite linux distro try to make this pc useful for web surfing mainly.

I dont want dual boot, or need any NT base operating system together with Linux.I want only one lite single Linux distro running on the pc.

I got formatted, partitioned the disk and installed Lubuntu many times, however for a week long already i couldn't manage to get Lubuntu boots which is only installed operating system on the disk.

After the installation is completed, i immediately got the following command line instead lubuntu is booted;

Entering rescue mode... 
grub rescue>

I have two disk on the pc, one is primary and has 7.5 gb capacity which has Lubuntu installed on it, and one 40gb which is totally free with one partition that is only used for storing data.

What i have tried so far to make it working but no luck;

i get terminal run from the live lubuntu and executed the following commands;

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

It`s said that the MBR has been successfully updated.However it didnt fix the booting problem.

After that i have tried;

sudo update-grub 
sudo grub-install /dev/sda

and get the following error;

error: failed to get canonical path of /cow.

And lastly when i execute 'sudo parted /dev/sda print all' then i get the following;

Model: ATA QUANTUM FIREBALL (scsi) 
Disk /dev/sda: 7510MB 
Sector size (logical/physical): 512B/512B 
Partition Table: msdos 
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags  
1       1049kB  6988MB  6987MB  primary   ext4            boot  
2       6989MB  7510MB  521MB   extended  
5       6989MB  7510MB  521MB   logical   linux-swap(v1)


Model: ATA MAXTOR 6L040J2 (scsi) 
Disk /dev/sdb: 40.0GB 
Sector size
(logical/physical): 512B/512B 
Partition Table: msdos 
Disk Flags: 

Number  Start   End     Size     Type     File system  Flags  
1       32.3kB  40.0GB  40.0GB   primary  ntfs         boot


Model: Ut163 USB2FlashStorage (scsi) 
Disk /dev/sdc: 1011MB 
Sector size (logical/physical): 512B/512B 
Partition Table: msdos 
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags  
1       1049kB  1011MB  1010MB  primary  fat32        boot, lba


Warning: Unable to open /dev/sr0 read-write (Read-only file system). 
/dev/sr0 has been opened read-only.

Any help will be appreciated for me to make this Lubuntu bootable.Thank you very much.


Here how my drives current look:

https://i.hizliresim.com/kYyj17.png
(source: hizliresim.com)


Thank you very much for your answer.

I have installed the Boot Repair Disk on USB, run it through USB and clicked "Recommended Repair".It made me waited for a few minutes and said all repaired and fixed but when i rebooted the pc, result was same unfortunately..

When i try executing the commands you suggested, some executed successfully and some failed..here the results:

lubuntu@lubuntu:~$ sudo add-apt-repository ppa:yannubuntu/boot-repair
 Simple tool to repair frequent boot problems.

Website: https://launchpad.net/boot-repair
 More info: https://launchpad.net/~yannubuntu/+archive/ubuntu/boot-repair
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp0pi1meua/secring.gpg' created
gpg: keyring `/tmp/tmp0pi1meua/pubring.gpg' created
gpg: requesting key 60D8DA0B from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp0pi1meua/trustdb.gpg: trustdb created
gpg: key 60D8DA0B: public key "Launchpad PPA for YannUbuntu" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
lubuntu@lubuntu:~$ sudo sh -c "sed -i 's/trusty/saucy/g' /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list"
sed: can't read /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list: No such file or directory
lubuntu@lubuntu:~$ sudo sh -c "sed -i's/trusty/saucy/g'/etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list"
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...

  -n, --quiet, --silent
                 suppress automatic printing of pattern space
  -e script, --expression=script
                 add the script to the commands to be executed
  -f script-file, --file=script-file
                 add the contents of script-file to the commands to be executed
  --follow-symlinks
                 follow symlinks when processing in place
  -i[SUFFIX], --in-place[=SUFFIX]
                 edit files in place (makes backup if SUFFIX supplied)
  -l N, --line-length=N
                 specify the desired line-wrap length for the `l' command
  --posix
                 disable all GNU extensions.
  -r, --regexp-extended
                 use extended regular expressions in the script.
  -s, --separate
                 consider files as separate rather than as a single continuous
                 long stream.
  -u, --unbuffered
                 load minimal amounts of data from the input files and flush
                 the output buffers more often
  -z, --null-data
                 separate lines by NUL characters
      --help     display this help and exit
      --version  output version information and exit

If no -e, --expression, -f, or --file option is given, then the first
non-option argument is taken as the sed script to interpret.  All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.

GNU sed home page: <http://www.gnu.org/software/sed/>.
General help using GNU software: <http://www.gnu.org/gethelp/>.
lubuntu@lubuntu:~$ sudo sh -c "sed -i's/trusty/saucy/g' /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list"
sed: no input files
lubuntu@lubuntu:~$ sudo sh -c "sed -i 's/trusty/saucy/g' /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list"
sed: can't read /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list: No such file or directory
lubuntu@lubuntu:~$ sudo sh -c "sed -i 's/trusty/saucy/g' /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list"
sed: can't read /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list: No such file or directory
lubuntu@lubuntu:~$ sudo apt-get update
Ign cdrom://Lubuntu 14.10 _Utopic Unicorn_ - Release i386 (20141022.1) utopic InRelease
Ign http://ppa.launchpad.net utopic InRelease                                  
Ign http://ppa.launchpad.net utopic Release.gpg                                
Ign http://security.ubuntu.com utopic-security InRelease                       
Ign cdrom://Lubuntu 14.10 _Utopic Unicorn_ - Release i386 (20141022.1) utopic/main Translation-en_US
Ign cdrom://Lubuntu 14.10 _Utopic Unicorn_ - Release i386 (20141022.1) utopic/main Translation-en
Ign http://ppa.launchpad.net utopic Release                          
Ign cdrom://Lubuntu 14.10 _Utopic Unicorn_ - Release i386 (20141022.1) utopic/multiverse Translation-en_US
Ign cdrom://Lubuntu 14.10 _Utopic Unicorn_ - Release i386 (20141022.1) utopic/multiverse Translation-en
Ign cdrom://Lubuntu 14.10 _Utopic Unicorn_ - Release i386 (20141022.1) utopic/restricted Translation-en_US
Ign cdrom://Lubuntu 14.10 _Utopic Unicorn_ - Release i386 (20141022.1) utopic/restricted Translation-en
Hit http://security.ubuntu.com utopic-security Release.gpg           
Ign cdrom://Lubuntu 14.10 _Utopic Unicorn_ - Release i386 (20141022.1) utopic/universe Translation-en_US
Ign cdrom://Lubuntu 14.10 _Utopic Unicorn_ - Release i386 (20141022.1) utopic/universe Translation-en
Ign http://archive.ubuntu.com utopic InRelease                       
Hit http://security.ubuntu.com utopic-security Release               
Ign http://archive.ubuntu.com utopic-updates InRelease                
Hit http://archive.ubuntu.com utopic Release.gpg                     
Hit http://archive.ubuntu.com utopic-updates Release.gpg             
Hit http://archive.ubuntu.com utopic Release                         
Hit http://security.ubuntu.com utopic-security/main i386 Packages              
Hit http://archive.ubuntu.com utopic-updates Release                 
Hit http://security.ubuntu.com utopic-security/restricted i386 Packages        
Err http://ppa.launchpad.net utopic/main i386 Packages                         
  404  Not Found
Hit http://security.ubuntu.com utopic-security/universe i386 Packages 
Ign http://ppa.launchpad.net utopic/main Translation-en_US            
Hit http://security.ubuntu.com utopic-security/multiverse i386 Packages
Ign http://ppa.launchpad.net utopic/main Translation-en               
Hit http://security.ubuntu.com utopic-security/main Translation-en    
Hit http://security.ubuntu.com utopic-security/multiverse Translation-en 
Hit http://security.ubuntu.com utopic-security/restricted Translation-en
Hit http://security.ubuntu.com utopic-security/universe Translation-en
Hit http://archive.ubuntu.com utopic/main i386 Packages
Hit http://archive.ubuntu.com utopic/restricted i386 Packages
Hit http://archive.ubuntu.com utopic/universe i386 Packages
Hit http://archive.ubuntu.com utopic/multiverse i386 Packages
Hit http://archive.ubuntu.com utopic/main Translation-en
Hit http://archive.ubuntu.com utopic/multiverse Translation-en
Hit http://archive.ubuntu.com utopic/restricted Translation-en
Hit http://archive.ubuntu.com utopic/universe Translation-en
Hit http://archive.ubuntu.com utopic-updates/main i386 Packages
Hit http://archive.ubuntu.com utopic-updates/restricted i386 Packages          
Hit http://archive.ubuntu.com utopic-updates/universe i386 Packages            
Hit http://archive.ubuntu.com utopic-updates/multiverse i386 Packages          
Hit http://archive.ubuntu.com utopic-updates/main Translation-en               
Hit http://archive.ubuntu.com utopic-updates/multiverse Translation-en         
Hit http://archive.ubuntu.com utopic-updates/restricted Translation-en         
Hit http://archive.ubuntu.com utopic-updates/universe Translation-en           
W: Failed to fetch http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu/dists/utopic/main/binary-i386/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
lubuntu@lubuntu:~$ sudo apt-get install -y boot-repair && (boot-repair &)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package boot-repair

By the way i used the erase disk and install ubuntu option in the installation wizard of the ubuntu, not arranged the partitions myself for "/","swap" etc.

Don't know what is the wrong, i have tried other distros too like Elementary OS, Xubuntu or so but the result same..got stucked at Grub Rescue command line instead OS is booted after installation is completed.


@mchid thank you very much for your help.Here are the results:

All commands are executed without any error at all first of all, thank you for fix the commands up according to my version.

lubuntu@lubuntu:~$ sudo mount /dev/sda1 /mnt
lubuntu@lubuntu:~$ sudo grub-install --root-directory=/mnt/ /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
lubuntu@lubuntu:~$ for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i;  done
lubuntu@lubuntu:~$ sudo chroot /mnt
root@lubuntu:/# sudo update-grub
sudo: unable to resolve host lubuntu
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-3.16.0-23-generic
Found initrd image: /boot/initrd.img-3.16.0-23-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
root@lubuntu:/# sudo reboot

Sounded like grub installed and updated successfully however it didnt help, when i rebooted the computer i got stuck at same grub recovery console..

After that i executed the following commands for boot-repair:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sh -c "sed -i 's/utopic/saucy/g' /etc/apt/sources.list.d/yannubuntu-ubuntu-boot-repair-utopic.list"
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Unfortunately it didn't fix the problem as well whatever its said that boot problem is repaired well.Here its log after repair is finished:

http://paste.ubuntu.com/8818796/

Extra notes that might be important maybe:

  • I have noticed hat in the advanced options section of the Boot-Repair utility that MBR options tab was disabled. I didnt made any setting and run the boot-repair with advanced options but simple run the recommended repair but anyway noticed this whatever i dont have an idea if its an important hint for the problem ?

  • After reboot, in the welcome screen of Lubuntu where we choose either install,try lubuntu etc, i choosed the option called "boot from first harddisk" and i got the following result in the command line:

isolinux: Found something at drive = F0

isolinux: Extremely broken BIOS detected, last attempt with drive = EF

isolinux: See http://syslinux.zytor.com/sbm for more information.

isolinux: Diskerror 01, AX = 4222, drive EF

Sounds like a very serious problem ? Is there anything else to do to solve this or it looks hopeless ?

Thank you.

  • Check your bios settings and also check the jumpers on your hard drives. You do not want the storage disk (/dev/sdb) as either the first drive to boot in BIOS or as the master drive (jumpers) preferably it should be set as a slave. You do want the 7GB hard disk as the master (jumpers) and the first drive or better yet the only drive set to boot from in BIOS. – mchid Nov 5 '14 at 1:51
  • If that gives you the same result try it the other way around (sda as slave and sdb as master). – mchid Nov 5 '14 at 1:53
  • Also, sometimes it helps to enter a "boot menu" at startup from where you can select the device to boot from there. – mchid Nov 5 '14 at 1:54
  • I got the second disk (40gb) totally unattached fom the mainboard and executed the commands you provided.Finally booting problem fixed!!! Only now i have small problem that in booting i get GRUB boot menu displayed as default and when i have searched for how to skip that on google i have found out that i have to change the timeout setting in grub.cfg.However when i open this file it doesn't let me make the changes and save it.Seems this file is only readable.How can i modify this file to make the timeout setting to skip Grub Menu at the start ? @mchid – Umut Nov 7 '14 at 22:27
  • Also i dont have lubuntu splash screen displayed when lubuntu is being loaded but instead of that just black screen and after its loaded in background then i get the login screen of lubuntu.What can be the reason of that ? @mchid – Umut Nov 7 '14 at 22:31
1

You can reinstall grub without bootrepair from the installation disk. Choose "try lubuntu without installing" to log into a live session. Then, open a terminal and type the following commands:

sudo mount /dev/sda1 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda

If there are any errors, they should help diagnose the problem. If no errors are listed, run the following commands from an open terminal:

for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i;  done
sudo chroot /mnt
sudo update-grub
sudo reboot

If you still want to run bootrepair, You can run these commands. I made a few changes based on the error you posted.

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sh -c "sed -i 's/utopic/saucy/g' /etc/apt/sources.list.d/yannubuntu-ubuntu-boot-repair-utopic.list"
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

The old command was for Ubuntu 14.04 (trusty). Also, the filename was missing "-ubuntu-" so the file could not be found. It should now work with no errors.

  • on a side note, there's lilo and there's grub, you usually use one or the other although most people use grub – mchid Nov 2 '14 at 18:40
  • dont know how to make quotation on the answer so i could post my answer as new post.thank you. – Umut Nov 2 '14 at 21:53
  • @Umut Thanks for posting the errors. I went ahead and changed the instructions. This method reinstalls grub manually without bootrepair. Please post any errors. – mchid Nov 3 '14 at 3:30
  • @Umut Also, I fixed the command that was giving you the error if you still want to run boot-repair instead. I tested the command on a utopic desktop to make sure it works. – mchid Nov 3 '14 at 3:52
  • thank your for your efforts.please see my new answer. @mchid – Umut Nov 4 '14 at 14:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.