LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   How to finish lfs (https://www.linuxquestions.org/questions/linux-from-scratch-13/how-to-finish-lfs-507227/)

Narc0tiq 12-16-2006 01:47 PM

Quote:

Originally Posted by status1
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 ?

No, dd will not do that. To be honest, if you can boot from the floppy, you don't really need to do anything else to it.

Quote:

Originally Posted by status1
So now my prompt looks like this
-bash-3.00# Is that correct ?

Yes, you have booted successfully into the shiny, brand new LFS system. Congratulations!

Quote:

Originally Posted by status1
One thing I noticed was that it doesn't show the working directory in the prompt but I think that can be fixed

Yup. Try
Code:

export PS1="[\u@\h:\w]\$ "
, and if you like it, add the line into /etc/profile.

Quote:

Originally Posted by status1
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.

Again, if it boots from the floppy, you don't need to add menu.lst to it at all. I haven't used a boot floppy in ages, and never with grub, so I honestly don't know how it works. However, I do know that menu.lst is used by grub to display the possible boot choices when booting from the hard-drive. So you probably don't need it for floppy boot.

status1 12-16-2006 03:41 PM

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

Narc0tiq 12-16-2006 04:10 PM

Quote:

Originally Posted by status1
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

Oh, I see. Hm... tell me more about not being able to mount the floppy - what you do and what you get.

Quote:

Originally Posted by status1
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 until I will be using X

Thanks for that info - I didn't know that and will probably add the export PS1 line to my .bashrc, too. Speaking of good lines for interactive shells, alias ls='ls --color' is quite nice.

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. :)

status1 12-16-2006 04:14 PM

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

status1 12-16-2006 04:33 PM

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 ?

status1 12-16-2006 05:15 PM

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

Vitalie Ciubotaru 12-16-2006 06:00 PM

Why "menu.lst"? It is nothing, but a symbolic link to grub.conf which is a configuration file itself.

status1 12-16-2006 06:54 PM

Hello,
That would be fine if I had grub.conf
I would have to create it first in order to link to it, no ?

status1 12-16-2006 08:33 PM

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

Narc0tiq 12-17-2006 12:58 AM

Quote:

Originally Posted by Vitalie Ciubotaru
Why "menu.lst"? It is nothing, but a symbolic link to grub.conf which is a configuration file itself.

This is not true on either my LFS install or my DSL install - perhaps your distribution is more esoteric.

Narc0tiq 12-17-2006 01:00 AM

Quote:

Originally Posted by status1
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

I'm happy to hear you were successful, however I must point out you did most of the real detective work yourself - good job! :)

status1 12-17-2006 08:08 AM

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.

Narc0tiq 12-17-2006 01:06 PM

Quote:

Originally Posted by status1
At the end of the book it says to unmount the virtual and $LFS file systems
Does that really 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.

There's no harm in keeping them around - the book just assumes that by that point you haven't rebooted yet, so the unmount is to unmount them cleanly from the host system in order to do said reboot.

You can always remount them again if something does go wrong (like when I accidentally renamed my /lib/ directory - oops!).

hbinded 12-17-2006 11:26 PM

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
# mkfs -t msdos /dev/fd0
# mkdir -pv /floppy
# mount -t msdos /dev/fd0 /floppy
# mkdir -p /floppy/boot/grub
# cp /usr/local/share/grub/i386-pc/stage*/floppy/boot/grub
# umount -v /floppy

now run this in the chrooted console:
Code:

# grub
This will brings up grub's shell.

Then run these commands in the same window:
Code:

grub> setup (fd0)
grub> quit

There you are, you have your working boot floppy

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.

status1 12-24-2006 08:53 AM

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 ?


All times are GMT -5. The time now is 01:27 PM.