LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-02-2010, 08:43 AM   #1
supanatral
LQ Newbie
 
Registered: Mar 2010
Posts: 19

Rep: Reputation: 0
Making Hard drive bootable with LFS


I'm following the tutorial from Linux from Scratch and I've done all the compiling needed and everything seemed to go according to plan. I'm stuck now on the very last thing they ask you to do which is make the hard drive bootable.

Here is the page of the tutorial that I'm on:
http://www.linuxfromscratch.org/lfs/...er08/grub.html

It tells me to run the following command:
Code:
grub-setup '<DEVICE>'
So I've run:
Code:
grub-setup '(hd0)'
When I do this, I get a an error saying: "Segmentation Fault"

Am I doing something wrong? This is running on a VMWare ESX 3.5 server incase that helps any bit. Thanks!
 
Old 04-02-2010, 08:55 AM   #2
Jim44
Member
 
Registered: Feb 2006
Location: Atlanta, Georgia, USA
Distribution: Mint, Ubuntu, Centos
Posts: 57

Rep: Reputation: 15
Quote:
Originally Posted by supanatral View Post
I'm following the tutorial from Linux from Scratch and I've done all the compiling needed and everything seemed to go according to plan. I'm stuck now on the very last thing they ask you to do which is make the hard drive bootable.

Here is the page of the tutorial that I'm on:
http://www.linuxfromscratch.org/lfs/...er08/grub.html

It tells me to run the following command:
Code:
grub-setup '<DEVICE>'
So I've run:
Code:
grub-setup '(hd0)'
When I do this, I get a an error saying: "Segmentation Fault"

Am I doing something wrong? This is running on a VMWare ESX 3.5 server incase that helps any bit. Thanks!
First you say you are running on a VMWare server, are you running this on the host or in a container? I'm fairly certain you should do this only from a host.

Second try grub-setup /dev/sda

Jim.
 
Old 04-02-2010, 11:23 AM   #3
supanatral
LQ Newbie
 
Registered: Mar 2010
Posts: 19

Original Poster
Rep: Reputation: 0
Well, it is a it's a vmware host. It's the vmware esx which is the bare hypervisor.

I tried using /dev/sda and I tried inside the single quotes and without:
Quote:
Invalid device `/dev/sda'.
Try ``grub-setup --help'' for more information.
root:/# grub-setup '/dev/sda'
Invalid device `/dev/sda'.
Try ``grub-setup --help'' for more information.

root:/# grub-setup '(hd0)'
Segmentation fault
 
Old 04-03-2010, 05:44 AM   #4
Jim44
Member
 
Registered: Feb 2006
Location: Atlanta, Georgia, USA
Distribution: Mint, Ubuntu, Centos
Posts: 57

Rep: Reputation: 15
Quote:
Originally Posted by supanatral View Post
Well, it is a it's a vmware host. It's the vmware esx which is the bare hypervisor.

I tried using /dev/sda and I tried inside the single quotes and without:
I didn't see where you tried it without the quote marks. In any case do an
fdisk -l

That will tell you what the name of the hard drives are.

Quote:
sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000855d

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2433 19543041 83 Linux
/dev/sda2 2434 19457 136745280 83 Linux
You might have /dev/hda instead. Fdisk will tell you for sure.

You are running as root (su) right?

Jim.

Last edited by Jim44; 04-03-2010 at 05:45 AM.
 
Old 04-03-2010, 01:08 PM   #5
supanatral
LQ Newbie
 
Registered: Mar 2010
Posts: 19

Original Poster
Rep: Reputation: 0
I've figured out what was wrong because of your help so thank you! there was no files listed in the /proc/ folder so I reverted back to before I compiled the kernel and more importantly before I restarted the virtual machine. When I did that, there were files listed in the /proc/ folder.

So, I ran all the commands that were asked except for the "/sbin/reboot" command and the "grub-setup '(hd0)'" command worked.

I'm still getting a kernel panic when I restart but at least the hard drive is bootable. I'm pretty sure it has to do with the modules I've changed (or rather not changed) in the kernel config. Thanks again!
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Having a hard time making linux recognizing my new external hard drive jared nelson Linux - Hardware 19 03-24-2009 03:39 PM
Making Pen Drive Grub bootable gkgm Linux - Enterprise 2 04-07-2008 12:43 AM
making a WD My Book external USB drive bootable gregmcavoy Debian 1 01-03-2008 09:12 PM
Making a usb card(pen drive) bootable with damn small linux Digital Surgeon DamnSmallLinux 2 01-05-2007 07:56 PM
Making a bootable rescue-disk/mini-distro CD with LFS? dushkinup Linux From Scratch 5 04-15-2004 03:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08: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
Open Source Consulting | Domain Registration