Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,151
Rep:
A few odd errors in new LFS build
I have just changed my machine to a core i3 duel booting with windows ( for the wife I hasten to add as I wouldn't touch it with a 10' battle lance ) and I have run into a few ( maybe unrelated problems ).
1)
Installed grub 1 as usual, but the 'savedefault' option in the /boot/grub/menu.lst file is causing a problem, I have always used this without mishap but now I get a 'file not found' error if I include it in the menu, if I manually set /boot/grub/default the highlight works.
Code:
# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'. Thu Jun 6 11:54:34 2013
#
# The backup copy of the MBR for drive '/dev/sda' is
# here '/boot/grub/mbr.sda.2431'. You can restore it like this.
# dd if=mbr.sda.2431 of=/dev/sda bs=512 count=1
#
# Start GRUB global section
timeout 10000
color red/black black/green
default saved
# End GRUB global section
# Other bootable partition config begins
title Windoze on (/dev/sda2)
map (hd0,0) (hd0,1)
map (hd0,1) (hd0,0)
# savedefault
rootnoverify (hd0,1)
makeactive
chainloader +1
# Other bootable partition config ends
# Linux bootable partition config begins
title Colossus on (/dev/sda7)
# savedefault
root (hd0,6)
# savedefault
kernel /boot/bzImage-3.4.47 root=/dev/sda7 ro vga=791
title Slack64 on (/dev/sda8)
# savedefault
root (hd0,7)
# savedefault
kernel /boot/vmlinuz root=/dev/sda8 ro vga=normal
title PMagic on (/dev/sda8)
root (hd0,7)
# savedefault
kernel /pmagic/bzImage root=/dev/sda8 ro vga=791
initrd /pmagic/initrd.img
# savedefault
# Linux bootable partition config ends
title --- For help press 'c', type: 'help'
root (hd0)
title --- For usage examples, type: 'cat /boot/grub/grub.txt'
root (hd0)
As you can see I have had to comment out the 'savedefault' option.
2)
Setup ntp as always but for some reason it keeps getting the wrong time, it adds an hour unless I add 'ntpdate 0.uk.pool.ntp.org' to the start of the init script.
3)
Mouse keeps not getting detected at boot, both gpm and X have the same problem, but if I unplug and re-plugin the mouse it's fine, this is the same mouse as I used in my old system with the same config, don't have a clue about this one.
4)
Yet again udev is not creating symlinks to my DVD properly, had to manually edit the rules like so
The file came from slackware 14 that I used to build this LFS, the bits commented out do nothing when un-commented the one line left in I added manuallly which does work.
Other than these minor niggles the install went fine had to fiddle about with the propriety radeon driver but I expected that I have always had an nvidia card and always have to fiddle with that.
Don't you just love rolling your own!
Ubuntu users don't know what they're missing!
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,151
Original Poster
Rep:
Well as no one wants to help I'll help myself!
Solved the ntp problem used
Code:
/usr/sbin/ntpd -gqx
which seems to do it the -g option allows for a big first adjustment, - q sets the time and quits which is fine as I don't leave my machine on long term so the clock doesn't drift too much and -x which allows a slew of 600 seconds.
The discussion I read regarding the patch for this issue took place seven years ago and involved v0.96. As you know, v0.97 also is from around the same time period. I just thought maybe your version might be an earlier one and maybe benefit from using the final version. I doubt that digging up that old patch will be worth the trouble. There just must be something about new contemporary hardware that makes the old code not obtain the location of the default file.
Maybe you can hack the source code and tell it where the default file is in this particular layout so it doesn't have to discover it. You might find all that stuff in /stage2/builtins.c in the source tree.
Anyway, if you never get anywhere with this, you can always replace it with GRUB 2 and handle its config file manually and simply a lot like legacy GRUB ignoring all the scripts, other files, and most of the usual crap in a typical grub.cfg file. That's what I eventually decided to do with it.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,151
Original Poster
Rep:
I actually install grub from a 'pmagic' live disk via a prebuilt package so I don't have the source code, I think you may be right that it is just that the hardware is too new I dislike grub 2 though I haven't used it since my ubuntu days but I may have to bite the bullet and try it again, tried 'lilo' but it would only boot the first linux distro or windows I have windows (urgh!) + LFS + pmagic + slackware14, lilo's too crude.
I actually install grub from a 'pmagic' live disk via a prebuilt package so I don't have the source code, I think you may be right that it is just that the hardware is too new I dislike grub 2 though I haven't used it since my ubuntu days but I may have to bite the bullet and try it again, tried 'lilo' but it would only boot the first linux distro or windows I have windows (urgh!) + LFS + pmagic + slackware14, lilo's too crude.
What? How is it crude? At least LILO keeps drive naming convention (using device nodes) as drives instead of making up its own system. I think grub is more crude then LILO is in a lot of ways. In some cases LILO completely mops the floor with grub. A Perfect example is the ability to boot LVM and Software Raid Drives WITHOUT a exposed /boot partition. Another example is when you mix IDE and SATA drives together... grub can't tell what drive is (hd0) if both SATA and IDE drives are the master, because technically they both are and because of this grub will fail each and every time! Their naming convention was not through out all too well. A posed to LILO using just standard device node names to map drives, resulting in having both /dev/hda and /dev/sda and being able to boot off either one of them without issue.
Yes with LILO I need to reinstall it each time I change something. but these days even when comping a kernel it pretty much does it for you anyways, and if you want to make it seem automagic then create a patch and patch the makefile so it updates lilo on its own... not really that big a deal.
I currently have 5 OS's installed under LILO this very moment.
Slackware, OpenSuse, WinXP, FreeDOS and LFS.. works fine here.
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,151
Original Poster
Rep:
Don't care what you say lilo installed from slack would only boot the two osses I mentioned, also as you point out every time you change anything you have to reinstalll lilo with grub I just change a menu entry, I don't run raid or lvm so I can't comment, and frankly I ain't interested in a flame war about lilo versus grub, this post was about some problems in my latest install of LFS and not about what boot loader to use.
Don't care what you say lilo installed from slack would only boot the two osses I mentioned, also as you point out every time you change anything you have to reinstalll lilo with grub I just change a menu entry, I don't run raid or lvm so I can't comment, and frankly I ain't interested in a flame war about lilo versus grub, this post was about some problems in my latest install of LFS and not about what boot loader to use.
End of lilo/grub discussion.
No flames here, I just don't think calling something crude because it acts different from what you are used to is fair.
If you want help with LILO post your current lilo.conf and some info on how your OS partitions are setup (how are they spanned across the hard drives/partitions).
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,151
Original Poster
Rep:
Well 'Bit the bullet' and compiled and installed Grub2, had a little trouble getting it to compile on a pure x86_64 install had to set --build=x86_64 --target=x86_64 --host=x86_64 and had a little trouble with the grub.cfg ( wouldn't boot first time - Don't you just love PMagic! ) but all seems to now be working including the 'savedefault' option which is configured a bit different from grub1, also my grub files have gone into /grub instead of /boot/grub which is probably my fault as I had my boot partition mounted on /boot when i did grub-install, but I shall leave it where it is and change it next time I do a complete rebuild of LFS.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.