LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-07-2010, 11:55 AM   #1
fulminatrix
LQ Newbie
 
Registered: Dec 2010
Posts: 2

Rep: Reputation: 0
Grub problems


thanks guys for your time!
ok,so i have hdd with debian distro on it and table partition as follows: sda1(vfat- primary), sda4 (vfat- extended),sda2(primary linux swap),sda3(ext3-primary-boot).
on another hdd which is smaller i recreated the partition table with fdisk and resized the sda4 extended one, then i used clonezilla and cloned sda3 which basically contains the os and the one partiton that i most need.
the first hdd has lilo 2.22 boot loader, on the second hdd that i cloned i have to restore lilo but do not know how(any sugestions here will be most welcomed), so i thought to install grub from a ubuntu 9.10 installation cd. here is what i have tried:
ubuntu@ubuntu:~$ grub-install --root-directory=/boot /dev/sda3
Could not find device for /boot/boot: Not found or not a block device.

any sugestions on how to do it? i need to boot the cloned os. thank you!!
 
Old 12-07-2010, 01:12 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
You can copy the boot loader using dd using a live CD or a Linux system running from sda.
Code:
dd if=/dev/sda of=/dev/sdb bs=440 count=1 conv=notrunc,noerror
 
Old 12-07-2010, 03:27 PM   #3
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Your command from the live cd is missing the 'mnt'.

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

Here is a great article from ubuntu and installing from live cd is close to the end.

grub2
 
Old 12-07-2010, 03:32 PM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by Larry Webb View Post
Your command from the live cd is missing the 'mnt'.

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

Here is a great article from ubuntu and installing from live cd is close to the end.

grub2
Are you talking to me?

I said are you talking to me?

I don't see anyone else so you must be talking to me.



Actually, he is using lilo.

My method does not depend on any file system being mounted.

However, lilo will be copied to the new disk with the same configuration so it will attempt to boot from the first disk that the motherboard sees. That will work if he removes the original disk. It will not work if he keeps both disks.

If he keeps both disks then he should edit the lilo.conf on the second disk then chroot into that partition and run the lilo installer.
 
Old 12-07-2010, 03:39 PM   #5
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by stress_junkie View Post
Are you talking to me?

I said are you talking to me?

I don't see anyone else so you must be talking to me.

.
No I was talking to OP, if you will look he tried to install grub2 and I was just showing him a typo error.

I have installed grub2 a couple of different times but have always installed it on its own separate ext4 partition.
 
Old 12-07-2010, 03:47 PM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by Larry Webb View Post
No I was talking to OP, if you will look he tried to install grub2 and I was just showing him a typo error.
My brain stopped when he said that he had tried to get lilo onto the new disk.
 
Old 12-07-2010, 05:30 PM   #7
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by stress_junkie View Post
My brain stopped when he said that he had tried to get lilo onto the new disk.
I have that problem also.

I am not sure how many file systems grub2 will adapt to. (about all I think)
 
Old 12-09-2010, 01:52 PM   #8
fulminatrix
LQ Newbie
 
Registered: Dec 2010
Posts: 2

Original Poster
Rep: Reputation: 0
thank you guys for reply!! so i've tried what stress_junkie suggested but with little success, it did go however from black screen to just appearing " Li_ " and then hanged. then i looked over the article suggested by larry webb and followed the steps for installing grub2 and it worked like a charm.
thanks again guys for your solutions and suggestions!! topic can be closed, cya!
 
Old 12-09-2010, 02:53 PM   #9
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Quote:
Originally Posted by fulminatrix View Post
followed the steps for installing grub2 and it worked like a charm.
thanks again guys for your solutions and suggestions!! topic can be closed, cya!

Please go to the top of page and under Thread Tools button mark 'Solved'.
 
  


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
Gentoo... grub problems... "/boot/grub/stage1" exists... no halo14 Gentoo 5 02-06-2011 04:50 PM
Problems with GRUB CarlHammel Linux - Newbie 13 04-22-2010 09:12 AM
Problems with /boot/grub/grub.conf not being read properly on reboots cmeyer Linux - Software 1 10-11-2008 06:34 PM
Problems with GRUB, not using whats in grub.conf **FIXED silentpetey Linux - General 1 11-06-2006 09:24 AM
Grub Error 17: Cannot mount selected partition and other Grub problems Sebastian Naitsabes Linux - General 1 07-05-2005 08:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:37 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