LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices



Reply
 
Search this Thread
Old 12-24-2012, 08:19 AM   #1
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Rep: Reputation: 245Reputation: 245Reputation: 245
grub install remote drive


Hi

Ok I have a situation I would like to resolve.
Story so far, I have a pc I tried to put lfs on but cant build it on there, so I built on another machine dd over to drive but cant install grub.
Now what I intend to do is install grub from a local machine to the remote machine.
I have mounted the drive from remote machine to local/mnt/lfs dir local, (hope that makes sense). I have mounted the virtual kernel file system and chrooted into the remote drive I want to install grub, grub-install /dev/sda.
Now the thing thats stopped me proceeding, will this change the grub on the local machine or will it install into the remote drive, I am chrooted into the remote drive
 
Old 12-24-2012, 09:37 AM   #2
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 993

Rep: Reputation: 214Reputation: 214Reputation: 214
If you have mounted your host /dev to the chrooted system then /dev/sda whatever will be pointing to your local machine NOT the remote machine even though you have chrooted into the drive.
Do you physical access to the remote machine? If so I would boot from something like the partedmagick live CD and install grub from there, if you muck it up you may end up not being able to boot the local machine, make sure you have an alternative boot medium and/or a backup.
 
Old 12-24-2012, 09:50 AM   #3
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Original Poster
Rep: Reputation: 245Reputation: 245Reputation: 245
Hi Keith

Yes this is why I didn,t install grub as I thought it would point to local machine drive.
I dont have a grub disc at the moment i.e super grub and cant boot off a live cd. I did find another option grub-install --root-directory=/mnt/lfs /dev/sda but again the /dev/sda stops me.
I have thought about grub-install user@ip:/dev/sda
The local machine is the 1 that built the lfs for remote.
Wots it like with time to waste!!!
 
Old 12-24-2012, 11:21 AM   #4
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 993

Rep: Reputation: 214Reputation: 214Reputation: 214
Here's a thought, if your host and remote have a similar layout, booting from /dev/sda1 for instance as I recall if grub is installed in the MBR you can back it up with
Code:
dd if=/dev/sda of=/path/to/file bs=512 count=1
You could then reverse the process on the remote machine and it should install grub, I HAVEN'T TRIED THIS!, just an idea of how it could be done, you may fubar your system!
 
Old 12-24-2012, 11:29 AM   #5
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Original Poster
Rep: Reputation: 245Reputation: 245Reputation: 245
Hi

Yes just tried that lol.
 
Old 12-24-2012, 11:32 AM   #6
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 993

Rep: Reputation: 214Reputation: 214Reputation: 214
Great minds think alike!
Did it work?
 
Old 12-24-2012, 11:39 AM   #7
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Centos6.3/Debain
Posts: 1,762
Blog Entries: 1

Original Poster
Rep: Reputation: 245Reputation: 245Reputation: 245
No not yet try something else
 
Old 12-24-2012, 01:12 PM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,219

Rep: Reputation: 578Reputation: 578Reputation: 578Reputation: 578Reputation: 578Reputation: 578
Did you dd the drive from usb?
1. If so put the drive back in usb install grub to sdb, it will overwrite grub in sda.
2. Add sda to the boot menu on sdb.
3. reboot system select the entry for sda.
4. Unmount usb drive sdb & remove from machine.
5.reinstall grub on sda.
I know this works because I keep a usb drive with debian on it, just for that purpose.

Last edited by EDDY1; 12-24-2012 at 01:15 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Help! Upgraded remote server from Squeeze to Wheezy, grub install fails neilgunton Linux - Software 1 12-20-2012 05:41 PM
Grub install on same drive as MBR reference Weapon S Linux - Software 6 10-27-2012 06:33 PM
GRUB error on windows-only drive after ubuntu install on separate drive Pappou Linux - Newbie 4 03-22-2009 08:00 PM
fc3 install doesnt install grub properly onto sata drive sabo Linux - Newbie 4 02-03-2007 05:04 PM
install linux from remote hard drive kvnband Linux - General 2 08-21-2004 12:29 PM


All times are GMT -5. The time now is 12:02 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration