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 |
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.
|
Hello,
Thanks for the link to the grub manual. I will look into that. |
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. |
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. |
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).
|
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. |
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?
|
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 ? |
The file size has increased?!?
Quote:
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 Code:
brw-r----- 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 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. |
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 ? |
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. |
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 ? |
Quote:
Quote:
Quote:
Code:
passwd root |
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. |
Quote:
Quote:
Quote:
Code:
export PS1="[\u@\h:\w]\$ " Quote:
|
Hello,
The problem is that the boot floppy is not executing the menu.lst or at least it doesn't know where it is so I guess that's why it comes up in the grub shell so I have to enter the root, kernel and boot commands in order to boot otherwise it's just waiting in the grub shell for me to type something When I said "I can boot now" I meant by adding the commands from the menu list at every boot I found the PS command, I was just looking to find out where to place it There is some question on weather it should be in profile or bashrc I was reading in the "bash prompt HOWTO" where it says "the PS1 string should be set in .bashrc. this is because non-interactive bashes go out of their way to unset PS1. the bash man page tells how the presence or absence of PS1 is a good way of knowing whether one is in an interactive vs non-interactive (ie script) bash session. the way i realized this is that startx is a bash script. what this means is, startx will wipe out your prompt. when you set PS1 in .profile (or .bash_profile), login at console, fire up X via startx, your PS1 gets nuked in the process leaving you with the default prompt." For now I will place it in profile since it will be a while untill I will be using X |
Quote:
Quote:
I'm mostly still just a beginner myself, so take everything I say with a grain of salt and a look at other documentation on the subject. :) |
Hello,
Here is what happens if I try to mount the boot floppy When I type "mount /dev/fd0 /mnt/floppy" I get "mount: you must specify the filesystem type" Do I have to specify the filesystem even if it's ext2fs ? I am thinking that it is asking because it's a boot floppy. I could specify but I am thinking it may wipe out the boot part of the floppy I could give it a try with another floppy just to see what happens If I use a regular ext2fs formated floppy I can mount it with no problem It's not asking about the filesystem, so that's why I am thinking the boot floppy is somewhat different |
Hello,
Another oddball thing that I noticed with this Bash 3.00 If I have a long line after the prompt and I want to insert some text before it and starts to wrap it goes onto the begining or starts wraping up over the the line above. Is there a fix for that ? I did not have a problem with the lfs live cd or throughout building lfs. It was always wraping the text down one line not up. Could it have something to do with trying to change the prompt with PS1 ? |
Hello,
I fixed the problem with the prompt. I guess it did not like whatever I put in the PS command so I just copied the whole profile file from the live cd to the /mnt/lfs/etc so now I have the same colors and style that is on the lfs livecd I just added the 2 export lines with the "LC_ALL" and "LANG" the were in the existing profile. I also copied the dircolors so now when I type ls I can tell right away what type of files I have and which are directories By the way the PS is in the profile in the lfs live cd so I will leave it there for now untill it becomes an issue |
Why "menu.lst"? It is nothing, but a symbolic link to grub.conf which is a configuration file itself.
|
Hello,
That would be fine if I had grub.conf I would have to create it first in order to link to it, no ? |
Hello,
SUCCESS!!!!! I finally made it. I used another method which is much easier (I think) Here is the link http://www.gnu.org/software/grub/gru...faq.en.html#q4 It's not using the dd command to make the bootable floppy You copy stage1, stage2 and the menu.lst and then make the floppy bootable from grub Now I just have to add my windows menu to it and I should be all set Thanks for everyones help on this forum. I don't think I could have done it without it |
Quote:
|
Quote:
|
Hello,
Well I try to find my own answeres as much as possible but sometimes I can't find it or it doesn't work for my situation so I need a little help to guide me in the right direction. Just by trying something I may discover something that may help in figuring out what I am missing. I have another question I am not sure how imortant this is. At the end of the book it says to unmount the virtual and $LFS file systems Does that reealy have to be done ? Is there any harm in keeping them for a while ? I don't plan on using them I just thought that if something goes wrong I may be able to go back and fix something in there. |
Quote:
You can always remount them again if something does go wrong (like when I accidentally renamed my /lib/ directory - oops!). |
I did it this way:
chroot into the installed lfs and open another x-term window/console from the host NOT lfs! make sure $LFS/dev is mounted (as per chapter 6). Create your "menu.lst" per lfs-instructions (it doesn't really matter if you make this file in chroot) and then run this on the host console as root (after inserting a floppy): Code:
# fdformat /dev/fd0 Code:
# grub Then run these commands in the same window: Code:
grub> setup (fd0) p.s. I forgot, you should put the menu.lst file in the grub folder. And it wont hurt to copy the other stage* files into the floppy. I made an image of the floppy and used cdimage to create a bootable cd. I kinda find it faster. |
Hello,
Sounds a little more complicated than the way I did it but if it works that's all that matters. I was wondering if it's possible to boot windows 98 and xp from the floppy directly. Right now I am using hd0,0 which brings me to the xp boot menu and from there I have a choice of booting either 98 or xp. This is not a problem, it's just another extra step I have to take to boot the os I want to use. I tried to use hd0,4 which is the partition that windows 98 is installed on but I am getting a "system disk" error because the linux floppy doesn't contain the boot information for windows 98. I have a different question. Now that I finished LFS I was wondering what gui program I should install I heard about KDE and Gnome but I was wondering if there are others that are relatively smaller in size since I don't think I will be downloading a few hundred mb's on a 56k dial up I heard about puppy linux and DSL and the entire linux program is 50 to 90 mb so I figure the gui program should be somewhat less. I was wondering what kind of gui DSL and puppy linux is using ? Is there a smaller version of KDE or Gnome ? |
grub howto please help
Hello Also
I have succesfully installed all the modules and kernel of lfs-6.2. When I am on preparation for the grub I am stuck with erros I am installing lfs on hda5 on hda1 i have windows and on hda7 i am having redhat 9 and hda8 is my swap. When I apply the comand from the grub menu as root (hd0,3) I am getting error no such device Then I changed it to root(hd0,6) to specify root to my lfs and again the same error. please help me how to go through successfully and have my lfs-6.2 boot ready thanks |
maybe this is what you want
if you don't want to mess with your MBR (and risk not being able to boot into Window$), then simply install grub into your Linux partition's MBR like so:
A) enter the grub shell. B) type "root (hdx,y)" (without the quotes, of course) and hit enter (replace x and y with the partition that your grub files are installed upon). C) type "setup (hdm,n)" (without the quotes, of course) and hit enter (replace m and n with the root partition your Linux system). D) quit the grub shell. E) type "dd if=/dev/hdhk of=~/linux.bin bs=512 count=1" (without the quotes, of course) and hit enter (replace hk with the root partition of your Linux system). You will now have a 512-kilobyte file in your home directory named "linux.bin". F) copy "linux.bin" to somewhere where Window$ can read it upon boot (the c: might be a popular choice). H) edit the Window$ file, "boot.ini", and add a line that says something like <c:\linux.bin="Linux"> (without the braces, of course). I) reboot and enjoy. |
All times are GMT -5. The time now is 05:11 AM. |