LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices

Reply
 
Search this Thread
Old 12-19-2009, 04:54 AM   #1
artal
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Rep: Reputation: 0
Grub2 in my own distribution


I try to make my own distribution with grub2. So I want to install file system on hard drive and also install grub2 from my cd.
However, when I try to run grub-setup from my cd, sh tells me:
Code:
/bin/sh: ./grub-setup: not found
Maybe I should configure grub with needed options? Does anybody know what options there must be?
 
Old 12-19-2009, 05:54 AM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 697

Rep: Reputation: 93
I'm guessing that you're running ./grub-setup from a script on the
cd during the installation process. Is that right?

If so, put the commands "mount", "pwd", "echo $PATH" and "set | more"
in that script temporarily. When you run it, you might be able to
figure out why ./grub-setup is not found.
 
Old 12-19-2009, 06:05 AM   #3
artal
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by carltm View Post
I'm guessing that you're running ./grub-setup from a script on the
cd during the installation process. Is that right?

If so, put the commands "mount", "pwd", "echo $PATH" and "set | more"
in that script temporarily. When you run it, you might be able to
figure out why ./grub-setup is not found.
No, I run ./grub-setup manually, because I only try to write installation script. When sh-terminal is loaded, I move to the folder "/sbin" and try to execute "./grub-setup --directory=/mnt/boot/grub --device-map=device.map /dev/sda". And sh replies me "... not found". I have same problems with busybox, when I try to build it not as a static library.
 
Old 12-19-2009, 06:11 AM   #4
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 697

Rep: Reputation: 93
Okay, then run these commands after booting from the cd at the point
where you would run ./grub.conf and post the results.

pwd
ls
 
Old 12-19-2009, 06:11 AM   #5
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,060

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
its grub-install isnt it?

grub-install --root-directory=/media/disk /dev/sda
 
Old 12-19-2009, 06:24 AM   #6
artal
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by carltm View Post
Okay, then run these commands after booting from the cd at the point
where you would run ./grub.conf and post the results.

pwd
ls
Code:
/sbin # pwd
/sbin
/sbin # ls
grub-dumpbios grub-mkconfig     grub-setup
grub-emu      grub-mkdevicemap
grub-install  grub-probe
And I mean grub-setup, because script grub-install run grub-setup in its code. So when I get an error with grub-install I try to run grub-setup manually.
 
Old 12-19-2009, 06:27 AM   #7
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 697

Rep: Reputation: 93
Okay, the files are there. Try running "ls -l" this time so
we can see if they are executable.
 
Old 12-19-2009, 06:33 AM   #8
artal
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by carltm View Post
Okay, the files are there. Try running "ls -l" this time so
we can see if they are executable.
Of course, I try it
Code:
-r-xr-xr-x
near all of the items
 
Old 12-19-2009, 06:50 AM   #9
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 697

Rep: Reputation: 93
Okay, let's try one more thing. Instead of "./grub-setup" try
"/sbin/grub-setup".
 
Old 12-19-2009, 07:02 AM   #10
artal
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Original Poster
Rep: Reputation: 0
I try, but this didn't help. And tab-completion see this file. I think that problems are in libraries, required by this program.
 
Old 12-19-2009, 07:05 AM   #11
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 697

Rep: Reputation: 93
One other thought, maybe it will work if you run the executable that
is on the cd, rather than the copy in /sbin. Or is there some reason
that you don't want to do it that way?
 
Old 12-19-2009, 07:16 AM   #12
artal
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by carltm View Post
One other thought, maybe it will work if you run the executable that
is on the cd, rather than the copy in /sbin. Or is there some reason
that you don't want to do it that way?
I run it from cd, there are livecd and root file system is the system on the cd. There is iso image to be more exact, and machine is vmware.

Last edited by artal; 12-19-2009 at 07:19 AM.
 
Old 12-19-2009, 07:26 AM   #13
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 697

Rep: Reputation: 93
Then it might be a problem with that cd. Try a different distribution
or a different version of the cd. Out of curiosity, which cd are you
using?
 
Old 12-19-2009, 07:31 AM   #14
artal
LQ Newbie
 
Registered: Dec 2009
Posts: 8

Original Poster
Rep: Reputation: 0
In first post I wrote that it is distribution, that I had been trying to create myself
 
Old 12-19-2009, 07:52 AM   #15
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 697

Rep: Reputation: 93
Okay, now that we know more about your environment, we know several things
that are not causing the problem.

You might want to describe how you're designing the cd and what sources
you are using for the executables and libraries.
 
  


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
grub4dos is grub2 or grub1? zoombee Linux - General 10 07-29-2010 05:25 AM
grub2 mbvo Slackware 7 11-12-2009 06:06 AM
Grub2 and iso boot ---- Again niravshah Linux - Newbie 6 09-18-2009 03:32 PM
grub2 - multiple OSes milomak Linux - General 7 06-17-2009 07:51 PM
Editing GRUB2 ssinustwo Fedora - Installation 1 07-20-2004 09:16 PM


All times are GMT -5. The time now is 09:55 PM.

Main Menu
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