LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   starting BLFS when finished LFS in Slackware & Please help me! (https://www.linuxquestions.org/questions/linux-from-scratch-13/starting-blfs-when-finished-lfs-in-slackware-and-please-help-me-4175435210/)

Forget-Me-Not 11-02-2012 02:53 AM

starting BLFS when finished LFS in Slackware & Please help me!
 
I use Slackware 13.37 to install LFS in partition sda2 # ext3

I finished LFS
http://www.linuxfromscratch.org/lfs/...09/reboot.html

I know BLFS will start with chapter 3 http://www.linuxfromscratch.org/blfs...b-release.html

But I don't know how will be able to start environment working of BLFS.

P/S:
Somebody told me no chroot environment.Then I logined Slackware, I didn't know how could login into my partition sda2(LFS).

This one has taken me a lot of time. Please help me!
Thank you very much!

druuna 11-02-2012 03:21 AM

Quote:

Originally Posted by Forget-Me-Not (Post 4820235)
I use Slackware 13.37 to install LFS in partition sda2 # ext3

I finished LFS
http://www.linuxfromscratch.org/lfs/...09/reboot.html

I know BLFS will start with chapter 3 http://www.linuxfromscratch.org/blfs...b-release.html

But I don't know how will be able to start environment working of BLFS.

P/S:
Somebody told me no chroot environment.Then I logined Slackware, I didn't know how could login into my partition sda2(LFS).

This one has taken me a lot of time. Please help me!
Thank you very much!

You mention you finished building LFS, which means you are able to boot into LFS (are you?).

The newly build LFS, although minimal, is the perfect environment to start building the parts from BLFS you want/need. There's no need any more for your host system at this point.

Can you elaborate a bit more about your actual problem?

Forget-Me-Not 11-02-2012 03:57 AM

I don't know how to boot into LFS !
I'm thinking it is a command-line to login into LFS environment.

druuna 11-02-2012 04:09 AM

Quote:

Originally Posted by Forget-Me-Not (Post 4820275)
I don't know how to boot into LFS !

You mentioned you finished building LFS, which means you either have done chapter 8.4 ( Using GRUB to Set Up the Boot Process) or edited the bootloader that came with your host to add LFS. In both cases you should have an extra option during your boot process which reflects LFS. You need to choose that one to boot into LFS.

Quote:

I'm thinking it is a command-line to login into LFS environment.
After you finish LFS you have an extra OS, which is completely independent from your host. You need to boot into LFS before you can login as a user.

Forget-Me-Not 11-02-2012 04:46 AM

I have the problem with GRUB2
http://www.linuxfromscratch.org/lfs/...er08/grub.html

Here is it:
Writing to 'stdio:grub-img.iso' completed successfully.

xorriso 1.2.4 : RockRidge filesystem manipulator, libburnia project.

libburn : SORRY : Cannot open busy device '/dev/sr0' : Device or resource busy
libburn : FAILURE : Cannot access '/dev/sr0' as SG_IO CDROM drive
xorriso : FAILURE : Cannot aquire drive '/dev/sr0'
xorriso : FAILURE : -as cdrecord: Job could not be performed properly.
xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'


How about SupperGrubDisk, druuna? Might you show me use SupperGrubDisk?

Forget-Me-Not 11-02-2012 06:27 AM

By the way

Writing to 'stdio:grub-img.iso' completed successfully.
It means that Grub's okey

And the problem is "burn CD out"

libburn : FAILURE : Cannot access '/dev/sr0' as SG_IO CDROM drive
xorriso : aborting : -abort_on 'FAILURE' encountered 'FAILURE'

druuna 11-02-2012 06:57 AM

First of all: Do not edit (completely remove and write something else) your posts.

Post #5 originally indicated that you would inform us at a later stage, you removed that statement and posted about what you encountered instead. I and probably most of the people that are actively helping do not re-read post. We are alerted automatically if a new post is made and only then I return to a thread. If you wouldn't have made post #6 I wouldn't have known you completely changed a previous post you made.

About your problem:

As stated in the beginning of the chapter:
Quote:

This section is not required to boot your LFS system. You may just want to modify your current boot loader, e.g. Grub-Legacy, GRUB2, or LILO.
My question to you: Do you need to install grub or can you use the bootloader that came with your host?
If a bootloader is already present I would advise you to use that one instead. Why replace an already existing bootloader (unless you want to remove your host at a later stage, in that case you do need to install grub).

Quote:

Originally Posted by Forget-Me-Not (Post 4820310)
Here is it:
Writing to 'stdio:grub-img.iso' completed successfully.
.
.

This is part of 8.4.1, which creates an emergency disk. This isn't needed if you have a working bootloader or have a liveCD (any liveCD). The point here is that you have a means to access your system if something goes wrong and it will not boot any more. A liveCD is all you need to do so.

Quote:

Originally Posted by Forget-Me-Not (Post 4820310)
How about SupperGrubDisk, druuna? Might you show me use SupperGrubDisk?

I don't have any experience with SupperGrubDisk and cannot help you with that.

The first thing you need to do is to decide what you want/need to do:
1) Use the bootloader that came with your host,
2) Install grub as described in the LFS book (which will remove your original bootloader!).

Forget-Me-Not 11-02-2012 07:37 AM

Apoligize!
I need the bootloader that come with my host.
I followed instruction in the book http://www.linuxfromscratch.org/lfs/...ble/index.html

I couldn't find where did they talk about the bootloader in the book?

druuna 11-02-2012 08:06 AM

Quote:

Originally Posted by Forget-Me-Not (Post 4820439)
I need the bootloader that come with my host.

The LFS book only describes how to install grub(2), editing the bootloader that comes with your host is not part of LFS.

There are 3 bootloaders that are generally used with Linux: Lilo, grub or grub2. Which one is used by Slackware nowadays, do they still use lilo?

TobiSGD 11-02-2012 08:17 AM

Slackware is still using Lilo, yes, and you can read up in Slackware's documentation (the Slackbook has a chapter about that) how to set it up.
When I see your posts here it comes to my mind that you have used LFS as an excercise on copy&paste, not for learning how Linux actually works, and that you have not read the recommended texts mentioned on the Prerequisite page of LFS, where the page with the hints explicitly states:
Quote:

...

However, it is important to take time to familiarise
yourself with the bootloader that you plan to use.
Check out the homepages for the bootloader (lilo's is not very
impressive):

[18]Grub

[19]Lilo

And the various HOWTO's, not all will be relevant for you:

[20]The Lilo mini-HOWTO

...

Forget-Me-Not 11-02-2012 08:20 AM

When I rebooted Slackware, It had a message press <Tab> LILO prompt...
And then I press <Tab>. It is a terminal with

boot:

TobiSGD 11-02-2012 08:26 AM

Please READ the documentation!!!

Forget-Me-Not 11-02-2012 09:11 AM

cd /boot

In my boot directory, It has not second kernel with ext3 support

root@localhost:/boot# ls
README.initrd@ config@ map
System.map@ config-generic-2.6.37.6 slack.bmp
System.map-generic-2.6.37.6 config-generic-smp-2.6.37.6-smp vmlinuz@
System.map-generic-smp-2.6.37.6-smp config-huge-2.6.37.6 vmlinuz-generic-2.6.37.6
System.map-huge-2.6.37.6 config-huge-smp-2.6.37.6-smp vmlinuz-generic-smp-2.6.37.6-smp
System.map-huge-smp-2.6.37.6-smp diag1.img vmlinuz-huge-2.6.37.6
boot.0800 diag2.img vmlinuz-huge-smp-2.6.37.6-smp
boot_message.txt initrd-tree/


I didn't uninstall LILO. I don't understand when will LILO be uninstalled?
I didn't interact at boot time. I think "interact at boot time" will be done at the final step.
I don't know how to add second kernel with ext3.

Please help me!!!
Thank you very much!!!

Forget-Me-Not 11-03-2012 04:08 AM

I'm sorry! I don't know how to remind you thus I added this thread! :cry:

stoat 11-03-2012 03:52 PM

Quote:

Originally Posted by druuna in post #7

The first thing you need to do is to decide what you want/need to do:
1) Use the bootloader that came with your host,
2) Install grub as described in the LFS book (which will remove your original bootloader!).

Quote:

Originally Posted by Forget-Me-Not in post #8

I need the bootloader that come with my host.

That right there makes me think that you want to keep your Slackware boot loader in place and add the LFS system to the Slackware boot menu. I've used Slackware, but in the distant past. And I used LILO even further in the past. So I, for one, am in no position to tell you to do anything to your Slackware boot loader. Maybe somebody else is willing. Unless they come along soon, I recommend that you seek help in the Slackware sub-forum about adding a new system to the Slackware LILO boot loader. I just don't see an LFS question here now.

Forget-Me-Not 11-04-2012 01:55 AM

I posted "adding a new system to the Slackware LILO boot loader" on Slackware-SubForum as you suggest

http://www.linuxquestions.org/questi...me-4175435521/

While waiting Slackware-SubForum's help. I'm worrying that will take a long time for giving the answer. Might I do it with SupperGrub2Disk?
http://www.supergrubdisk.org/super-grub2-disk/

I mean I will uninstall LILO of Slackware and install SupperGrub2Disk on the LFS. However I will research about SupperGrub2Disk, I don't know how to use it before.

Hope you help me! Thank you very much!

stoat 11-04-2012 06:07 AM

Quote:

Originally Posted by Forget-Me-Not

I posted "adding a new system to the Slackware LILO boot loader" on Slackware-SubForum...

Somebody has replied in your Slackware thread. Now try to fix your Slackware boot loader to boot LFS.

Quote:

Originally Posted by Forget-Me-Not

I mean I will uninstall LILO of Slackware and install SupperGrub2Disk on the LFS.

Once and for all, the Super Grub 2 Disk is not something that you install. It is merely a utility for emergency booting a system whose GRUB 2 boot loader is broken. IMO, everyone who uses GRUB should have some kind of emergency boot disk. The Super Grub 2 Disk is such a thing.

Forget-Me-Not 11-04-2012 09:00 AM

Like(facebook). :D

stoat 11-05-2012 08:45 AM

Okay. So I saw your post in the Slackware forum. It's trying to boot now. I don't want to post over there. But I recommend against that guy's idea to create an initial ramdisk for drivers. That is possible (there is a hint article about it), but the classic LFS way to handle that is by building in things that the kernel needs to boot. And today one guy over there referred you to the v6.5 LFS book as the newest version. Uh, maybe we should continue on here until you need Slackware boot loader help again.

The kernel is loading and starting its message spew, then stops very early. I recommend that you review your kernel config for file system and storage device support at this point. And it should be built in (* or =y), not modules (M or =m). That is the kind of stuff that can stop it from booting early. Another common error these days (I made it, too) is to forget to build in support for devtmpfs. Your LFS system will not boot without that. Not everything has to be built in. I have lots of modules, too. But this stuff needed for booting has to be built in.

Here, only as an example of what I mean, are some snippets from my kernel menuconfig notes regarding these kinds of filesystem and storage device things. I don't mean for you to mindlessly copy this stuff. Just review yours and make sure it accommodates your filesystem and hardware. A good idea for the hardware stuff is to examine the drivers in use by your host system, then see to it that the ones needed before the filesystem is mounted are built in to your LFS kernel...
Code:

                        |
                        |
                        |
                        |...Device Drivers --->
                        |    |
                        |    |...    Generic Driver Options --->
                        |    |        |
devtmpfs (enable)        |    |        |...[*] Maintain a devtmpfs filesystem to mount at /dev (CONFIG_DEVTMPFS=y)
                        |    |        |...[ ]  Automount devtmpfs at /dev, after the kernel mounted the rootfs (CONFIG_DEVTMPFS_MOUNT is not set)
                        |    |        |
                        |    |
                        |    |
                        |    |
SCSI drivers                |    |...    SCSI device support --->
                        |    |        |
                        |    |        |...-*- SCSI device support (CONFIG_SCSI=y, module=scsi_mod)
                        |    |        |...<*> SCSI disk support (CONFIG_BLK_DEV_SD=y, module=sd_mod)
                        |    |        |...<*> SCSI CDROM support (CONFIG_BLK_DEV_SR=y, module=sr_mod)
                        |    |        |...<*> SCSI generic support (CONFIG_CHR_DEV_SG=y, module=sg)
                        |    |        |
                        |    |
                        |    |
                        |    |
SATA/PATA drivers        |    |...<*> Serial ATA and Parallel ATA drivers ---> (CONFIG_ATA=y)
                        |    |        |
                        |    |        |...[*] ATA ACPI Support (CONFIG_ATA_ACPI=y)
                        |    |        |...<*> AHCI SATA support (CONFIG_SATA_AHCI=y)
                        |    |        |...[*] ATA SFF support (CONFIG_ATA_SFF=y)
                        |    |        |...[*] ATA BMDMA support (CONFIG_ATA_BMDMA=y)
                        |    |        |...<*> Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support (CONFIG_ATA_PIIX=y)
                        |    |        |...<*> Marvell PATA support via legacy mode (CONFIG_PATA_MARVELL=y)
                        |    |        |...<*> Intel PATA old PIIX support (CONFIG_PATA_OLDPIIX=y)
                        |    |        |...<*> Intel SCH PATA support (CONFIG_PATA_SCH=y)
                        |    |        |...<*> Intel PATA MPIIX support (CONFIG_PATA_MPIIX=y)
                        |    |        |...<*> Generic ATA support (CONFIG_ATA_GENERIC=y)
                        |    |        |
                        |
                        |
                        |
                        |...File systems --->
                        |    |
ext3 filesystem                |    |...<*> Ext3 journalling file system support (CONFIG_EXT3_FS=y, module=ext3)
                        |    |...[ ]  Default to 'data=ordered' in ext3 (CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set)
                        |    |...[ ]  Ext3 extended attributes (CONFIG_EXT3_FS_XATTR is not set)
ext4 filesystem                |    |...<*> The Extended 4 (ext4) filesystem (CONFIG_EXT4_FS=y, module=ext4)
                        |    |...[ ]  Use ext4 for ext2/ext3 filesystems (CONFIG_EXT4_USE_FOR_EXT23 is not set)
                        |    |...[ ]  Ext4 extended attributes (CONFIG_FS_XATTR is not set)
                        |    |...[ ]  Ext4 debugging support (CONFIG_EXT4_DEBUG is not set)
                        |    |
                        |
                        |

And if you get past this stuff, it may not be over. Brace for more of it that may need work after it boots. I spent days on video driver and firmware issues. I probably recompiled my first LFS kernel thirty times (not joking about that). I don't mean to sound discouraging, but there's no use in pretending at this point either.

P.S.: No promises for any of this. You may have a lot more work to do. But that stuff you're getting in the Slackware forum today will just have you wandering off into the tall weeds. I promise you that.

Forget-Me-Not 11-16-2012 09:00 AM

Thank you so much stoat!


All times are GMT -5. The time now is 03:54 PM.