LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-03-2006, 08:03 PM   #1
status1
Member
 
Registered: Sep 2006
Posts: 122

Rep: Reputation: 15
Question How to finish lfs


Hello,
I am building lfs for the first time using the lfs 6.0 and livecd
I am getting close to the end (chapter 8)
I need a litle help/guidance on how to finish lfs
I know this is a bit tricky going from the livecd to booting for the first time
I want to try it out first if I can so I need to make some kind of boot floppy or some other way of booting than what is in the book
I read a little bit ahead and noticed the warning about grub
overwriting the current boot loader
I don't want to mess with the MBR at this time if I can avoid it.
I don't want to overwrite the boot loader and then find out that I don't have a working system and render my windows useless
 
Old 12-03-2006, 10:03 PM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware-current, Cross Linux from Scratch, Gentoo
Posts: 2,755
Blog Entries: 1

Rep: Reputation: 238Reputation: 238Reputation: 238
If you have another Linux distro, just edit it's menu.lst or lilo.conf and add the LFS. Otherwise, the GRUB manual has instructions for creating a boot floppy or CD/DVD. Just insert the instructions for making a floppy when you get to section 8.4.
 
Old 12-04-2006, 06:59 PM   #3
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
Thanks for the link to the grub manual.
I will look into that.
 
Old 12-09-2006, 12:16 PM   #4
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
I got to the point of making the floppy but it doesn't seem to do anything.
I have to ask this first to make sure I am doing this right.
Do I make the floppy while I am inside chroot ?
I tried to mount the floppy while inside chroot but it did not work
I got "mount: /dev/fd0 is not a block device (maube try '-o loop'?)

I am thinking it may be a better idea to add lfs to the windows xp boot menu
but I am not sure how to do that.
I already have it set up for multi boot with windows98

Still, it would be nice if I could make a boot disk in case something goes wrong with the windows xp boot or the MBR.
 
Old 12-10-2006, 09:42 AM   #5
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
I am still trying to make a boot floppy but it doesn't seem to work
After I enter the 2 commands for stage1 and stage2 I can look at /dev/fd0 and I can see that the file size has increased but nothing is happening on the floppy

Are those commands supposed to make the boot floppy ?
Should the floppy be mounted somewhere special ?
Seems like I am missing something here.
 
Old 12-10-2006, 06:00 PM   #6
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Rep: Reputation: 30
If you can't do it chrooted into LFS, you still can do it from the other operating system (the host system you used to build your LFS).
 
Old 12-10-2006, 07:40 PM   #7
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
Ammm... I am not sure I can do that because I used the live cd so I don't have a linux host on the computer. I just have windows 98 and xp

I tried to install it on the hard drive but that's not working either because
I get a grub error "Error 21: Selected disk does not exist"
Not that I want to do it but I just wanted to try it to see if that works

I tried "root (fd" and then the tab key and completed it so it found fd0 even though it doesn't see it as a floppy but it doesn't find hd0 no matter what partition I use.
I have to do more research and try different things in order learn more about this so I can figure out what is going on.
 
Old 12-15-2006, 06:09 PM   #8
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Rep: Reputation: 30
Can't you do it from LFS livecd? I mean you can type "grub" and get into grub shell and do all the commands in it, right?
 
Old 12-15-2006, 07:38 PM   #9
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
Yes I can use grub if I am not inside chroot .
It recognizes (hd0,6) as ext2fs filesystem which is where I have LFS installed
and also shows the other fat filesystems that I have but if I am inside chroot
it doesn't recognize any filesystem on hd
Is grub supposed to work the same inside and outside chroot ?
I noticed that outside of chroot it's probing for devices and finding them but it doesn't appear to do that inside chroot.
It just goes straight to the grub prompt.
Do you think there is something wrong with the grub command or something with the fstab file perhaps ?
Where is grub looking for the mounted devices and filesystems ?
 
Old 12-15-2006, 07:46 PM   #10
Narc0tiq
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Rep: Reputation: 0
The file size has increased?!?

Quote:
Originally Posted by status1
[...]I can look at /dev/fd0 and I can see that the file size has increased [...]
/dev/fd0 is not supposed to change in size, it's a device node.

Sadly, I don't have a Linux box with a floppy disk drive around, or I might be able to give you a mknod command to create it properly, but take my word for it, /dev/fd0 should not change in file size because it should not have a file size!

How to check:
Code:
ls -l /dev/fd0
The result should start with something like:
Code:
brw-r-----
Note the "b" at the start, denoting it as a block device.

Hm... according to some message on a mailing list somewhere (I'm tired, and my Google-fu is unwilling to play) the commands:
Code:
mknod /dev/fd0 b 2 0
chmod 660 /dev/fd0
chgrp floppy /dev/fd0
should create your /dev/fd0 entry, since udev didn't create it for you.

EDIT: P.S.: Please note - none of this is guaranteed to help in any way. If your system refuses to do any of this, dumps core, or starts a small fire, I take no responsibility.

Last edited by Narc0tiq; 12-15-2006 at 07:49 PM.
 
Old 12-16-2006, 09:09 AM   #11
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
I was going to try that this weekend since I saw it a couple of days ago on the
internet but that was for other situation so I wasn't sure if it was going to work for me.
It's a lot better to get confirmation plus I wouldn't have known about adding
the "chgrp" at the end so I am not sure if it would have worked.

Anyway I tried it out and it works.
Thanks for your help.

Now I have to figure out the next step
When I boot from the floppy it goes into grub.
I have to create the menu.lst I am just not sure where to place it.
Should I place it where it says in the book (that would be on the hard drive)
or on the boot floppy that I just made ?
 
Old 12-16-2006, 10:00 AM   #12
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
Adding the menu.lst to the hard drive has no effect.
I can use the commands from the menu.lst but I am still in the grub shell

Looks like I am missing something here to be able to boot LFS.
 
Old 12-16-2006, 11:27 AM   #13
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
I made a little more progress.
I typed boot after entering the commands from the menu.lst so it booted for the first time.
I am guessing I will have to create the menu.lst on the floppy or point to where it's located on the hard drive.

When it first booted it was checking the partition where lfs was installed and
found some errors and said to reboot which I did.
Then the second time I had an error something to do with the network.

This I should be able to fix I just need some advice.

In chapter 7.10 of the LFS 6.0 book there is a line
"echo "HOSTNAME=[lfs]" > /etc/sysconfig/network"
and the book says
"[lfs] needs to be replaced with the name the computer is to be called"
I wasn't sure what to put here so I skipped it at the time I was building
LFS but I guess now it's time to put something there.

The question is what should I replace it with ?
Can it be any name or does it have to be something specific to my computer ?

There is one other issue
After pressing Enter to continue after that error I get to a login
"(none) login:"
What should be entered here for login and password ?

Last edited by status1; 12-16-2006 at 11:29 AM.
 
Old 12-16-2006, 11:59 AM   #14
Narc0tiq
LQ Newbie
 
Registered: Dec 2006
Posts: 15

Rep: Reputation: 0
Quote:
Originally Posted by status1
Hello,
I made a little more progress.
I typed boot after entering the commands from the menu.lst so it booted for the first time.
I am guessing I will have to create the menu.lst on the floppy or point to where it's located on the hard drive.
Yeah, if you'll be booting from the floppy, the grub on the floppy needs to be able to find it, and the best way to do that is to just put it in the grub/ dir on the floppy disk.

Quote:
Originally Posted by status1
In chapter 7.10 of the LFS 6.0 book there is a line
"echo "HOSTNAME=[lfs]" > /etc/sysconfig/network"
and the book says
"[lfs] needs to be replaced with the name the computer is to be called"
I wasn't sure what to put here so I skipped it at the time I was building
LFS but I guess now it's time to put something there.

The question is what should I replace it with ?
Can it be any name or does it have to be something specific to my computer ?
It can be anything - try "lfs" as a hostname, or "miranda", or "pandora".

Quote:
Originally Posted by status1
There is one other issue
After pressing Enter to continue after that error I get to a login
"(none) login:"
What should be entered here for login and password ?
The login should be root and the password should be whatever password you gave it earlier - if you've forgotten this, try booting the LiveCD and chrooting into it again, and issuing the command
Code:
passwd root
to change the root password.
 
Old 12-16-2006, 02:27 PM   #15
status1
Member
 
Registered: Sep 2006
Posts: 122

Original Poster
Rep: Reputation: 15
Hello,
This boot floppy seems to be different than the regular floppy.
I can't seem to mount it ar maybe I am not supposed to.
Should I be using the dd command to copy the menu.lst to the floppy ?

Thanks for the advice for the hostname
I used LFS.So now it doesn't stop at that error anymore
All that does is that it puts lfs instead of none at the login so now
I have [LFS]login
I was able to change the password too.
I must have forgot what I used for the password since it was quite a while ago
So now my prompt looks like this
-bash-3.00# Is that correct ?
One thing I noticed was that it doesn't show the working directory in the prompt but I think that can be fixed

So everything seems to be working
I still have to work on adding the menu.lst to the floppy but at least I can boot now.
 
  


Reply

Tags
floppy, grub, install, post


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
LFS 6.2: made mistake when going from lfs to root setup oldgeek Linux From Scratch 4 11-12-2006 10:00 PM
LFS question - lack of activity in LFS Forum nykey Slackware 4 06-05-2006 06:54 PM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 01:31 AM
LFS-7.0-cross-lfs-20050902-x86_64-Multilib Basel Linux From Scratch 0 09-03-2005 06:03 AM
cannot login as user 'lfs' [su - lfs] mayasedai Linux From Scratch 2 07-26-2005 07:10 AM


All times are GMT -5. The time now is 08:11 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration