LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-01-2012, 09:27 PM   #1
big ade
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Rep: Reputation: Disabled
Do I need an System Startup file for Ubuntu ?


I have a Toshiba Satellite A60 and I have just swapped in a new HDD, a Toshiba MK6026GAX (60GB), so the had disc is empty. I want to create a Laptop that when you turn it on, automatically boots from the hard disc and starts up Ubuntu.

I created a bootable Ubuntu installation CD by downloading the latest version (12.04) from the website.

I boot the Toshiba from the CD and Install Ubuntu, following the on screen instructions. I create a primary root partition and a swap partition as part of the installation process.
Installation continues to a successful conclusion, at which point I am asked to remove the Installation CD and re-boot. When I do this, the Toshiba fails to boot off the hard disc and sits there saying there is no bootable CD.

The Bios Set-up Boot Preferences are HDD, CD-ROM, FDD and Network in that order.

I have used the installation CD to 'Try out Ubuntu' and when I open the 'Home Folder', I can see the 60GB HDD under devices. When I browse the HDD, I can see what I assume is the Installed version of Ubuntu (has folders like bin, boot, dev,etc and lots of others.).

Do I need to set up some kind of System.ini/Startup/Bios file to allow the Toshiba to boot straight into Ubuntu ? If so, then what ?

Pretty new to all this stuff, so please be gentle and speak slowly !! Thanks.
 
Old 08-01-2012, 09:57 PM   #2
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Ubuntu uses GRUB2 as the bootloader. It sound like either GRUB was not installed, or it was not written to the MBR of the new HD.

It may be as simple as writing GRUB to the MBR, or you may need to chroot into the new installation to install GRUB. Let's deal with the simple case first.

Boot with the CD and browse to /boot on the HD. Now check for a /boot/grub directory. If this directory exists, check it's contents. There should be about 200 or so files in there. If that's OK, browse to /etc/default and check for the existence of a file named grub. If that file exists, you should be good to proceed.

Now open a terminal window and enter the following command:
Code:
sudo grub-install /dev/sda
This will write GRUB to the MBR of the HD. Since you only have one HD, it should be /dev/sda. If the installation was successful, you should get an Installation successful message.

Now try and boot normally and see if Ubuntu boots from the HD.

If /boot/grub does not exist, you'll need to install GRUB. This will involve chrooting into the installation on the HD and installing GRUB, so try the simple solution first and if that does not work, we'll deal with chrooting.
 
1 members found this post helpful.
Old 08-01-2012, 10:42 PM   #3
big ade
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Not Mounted

Thanks for that. Did the sudo grub-install /dev/sda and it came back with:

/usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).

Have i missed something ?
 
Old 08-02-2012, 08:22 PM   #4
towheedm
Member
 
Registered: Sep 2011
Location: Trinidad & Tobago
Distribution: Debian Stretch
Posts: 612

Rep: Reputation: 125Reputation: 125
Try this. Since you only have one HD, I'm assuming it's /dev/sda and you installed Ubuntu to the first partition, /dev/sda1.
Create a directory to mount /dev/sda1:
Code:
sudo mkdir /mnt/ubuntu
Mount /dev/sda1:
Code:
sudo mount /dev/sda1 /mnt/ubuntu
Mount the /dev and other needed filesystems:
Code:
sudo mount --bind /dev /mnt/ubuntu/dev
sudo mount -t proc proc /mnt/ubuntu/proc
sudo mount -t sysfs sysfs /mnt/ubuntu/sys
Run grub-install from a chroot environment:
Code:
sudo chroot /mnt/ubuntu /usr/sbin/grub-install /dev/sda
If that succeeds, run update-grub:
Code:
sudo chroot /mnt/ubuntu /usr/sbin/update-grub
This should return something similar to:
Code:
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-. . . .
Found initrd image: /boot/initrd.img-. . . .
done
Once the above commands succeeds, unmount the filesystems:
Code:
sudo unmount /mnt/ubuntu
Reboot from the HD.
 
1 members found this post helpful.
Old 08-13-2012, 06:51 PM   #5
big ade
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
More Sinister

Thanks for that and sorry I have been offline for a while.

I tried your latest set of terminal commands. All worked successfully apart from the unmount at the end. Still no joy when I re-boot the machine though. I suspect there is something more sinister and not Ubuntu related at play here.

I checked the bios System Setup menu. The bios for the old dead 30gb HDD says under 'Built in HDD = Primary IDE (1F0H/IRQ14)'. With the new 60gb HDD it says 'Built in HDD = No Drive'. I know that this is a Linux Forum and this is not really Linux related, but does anyone know why the bios is not seeing the new HDD when Ubuntu is ?
 
  


Reply



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
How to run system file checker on ubuntu 10.10 without damaging the system mansour Linux - Newbie 18 04-10-2011 11:53 AM
Ubuntu System Settings File iceb1977 Ubuntu 1 10-26-2010 07:39 AM
Run An sh File on startup in ubuntu server 9.10 Jamie Kugelmann Linux - General 3 05-15-2009 01:24 AM
Load .sh file on Linux Ubuntu startup Fired501 Linux - Server 3 01-01-2008 05:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:17 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration