LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Booting LFS from Hard Drive ?? (http://www.linuxquestions.org/questions/linux-from-scratch-13/booting-lfs-from-hard-drive-894626/)

mbzadegan 07-30-2011 08:03 AM

Booting LFS from Hard Drive ??
 
Hi anybody ,

i copied my LFS live cd files to (hd0,1) and set boot config to these :

kernel /lfs/boot/isolinux/linux
append initrd=/lfs/boot/isolinux/initramfs_data.cpio.gz

while i booted , my kernel and initrd loaded TRUE but the file root.ext2 didn't load and my shell command will

sh-3.2#

How can i load root.ext2 manually while booting ?

kasl33 07-31-2011 03:04 AM

I'm not exactly sure what you are trying to accomplish here other than mounting hard disks. In this case, if you are able to log in, then do this:

Code:

blkid
Once you see what your disk is recognized as (for each partition), then do this:

(Replace ext with whatever your filesystem is; ext4, vfat, ntfs, ntfs-3g, etc)
(Replace sda# with whatever yours is; sdb, hda, hdb, and the number with whatever partition yours is; sda1, sda3, sda7, etc)

Code:

# For root partition:
mount -t ext3 /dev/sda2 /

# For home partition
mount -t ext3 /dev/sda3 /home

# For swap
swapon /dev/sda1


mbzadegan 07-31-2011 05:57 AM

in my state i can run only 103 commands without any blkid or ...
because root.ext2 was not loaded and only my linux kernel and initrd was loaded .

my quastion is , how can i loaded root.ext2 with my kernel & initrd while booting ?

Tnx 4 your hints .

mbzadegan 08-01-2011 06:38 AM

BOOT LFS from HDD ??
 
Dear forumers ;

when i set my isolinux config to :

kernel /lfs/boot/isolinux/linux
append initrd=/lfs/boot/isolinux/initramfs_data.cpio.gz

my system stoped at these texts :

The problem may be caused by the fact that ISA IDE and SCSI adapters are
no longer attempted to be autodetected. If you use such hardware, load the
proper driver manually with the "modprobe" command and exit from this shell.
For old IDE controllers, the correct module name is "ide-generic", or, if
you want to use the new libata-based driver, "pata-legacy". To avoid this
message next time you boot this CD, use a kernel command line like this:
linux load=ide-generic

This problem can be also caused by a slow SCSI controller or USB/FireWire
CD-ROM that needs more time to be detected. If you see any kernel messages
below, this is the case. In this case, it is sufficient to type "exit",
and the CD will continue the boot process. To avoid this message next
ime you boot this CD, use a kernel command line like this:
linux rootdelay=20

Dropping you to a shell.


I think that my system search for root.ext2 on cdrom and when it didn't find it , it drop to shell sh-3.2#
I think that i must point kernel to find root.ext2 on my hdd .

Can Anybody help me to append my root.ext2 that is on my hdd and don't in the CDROM ?
in other words HOW could i boot LFS from my Hard disk Drive ??

mbzadegan 08-03-2011 03:12 AM

Dear forumers , I'm Waiting for your guides ...

druuna 08-03-2011 04:20 AM

Hi,

Too my knowledge you cannot copy the LFS liveCD to your hard-disk and boot it. It is a liveCD and not installable. I've been working with and following LFS for years and I never read an article/post that mentions how to do this.

Hope this helps.

mbzadegan 08-03-2011 06:09 AM

Tnx 4 your hints but in this page http://www.scribd.com/doc/55511186/I...D-to-Hard-disk describe it .
I tried it but in section 13 of that page i could not mount root.ext2 to rootfs folder !??

druuna 08-03-2011 09:30 AM

Hi,

I have to retract my previous words: The article your url points to does work after making some changes (It has a few typo's and an error).

- The article mentions isoLinux/Linux, which should be /isolinux/linux (no capitals). This typo/error shows up a few times.

- I'm not sure which grub version the article is based on, but I had to explicitly set the rw option when using grub 1.98.

This addition to my existing grub.cfg is what worked for me:
Code:

menuentry "LFS livecd from HD test" {
        set root='(hd0,3)'
        linux  /boot/linux root=/dev/sda3 rw
        initrd  /boot/initramfs_data.cpio.gz
}

I tested using /dev/sda3.

If I look at your first post I do see an error:
Code:

kernel /lfs/boot/isolinux/linux
append initrd=/lfs/boot/isolinux/initramfs_data.cpio.gz

That should be:
Code:

kernel /boot/isolinux/linux
append initrd=/boot/isolinux/initramfs_data.cpio.gz

Hope this helps.

BTW: Thanks for the recently created article!

mbzadegan 08-04-2011 04:45 AM

Dear druuna ,

Tnx 4 your hints and i'm so glad that anyone could boot LFS from HDD .
my grub.cfg is :


menuentry 'LFS livecd from HD test' {
set root='(hd0,4)'
linux /boot/isolinux/linux root=/dev/sda4 rw
initrd /boot/isolinux/initramfs_data.cpio.gz
}


menuentry 'Backtrack 5 Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set e1788ac9-960b-4495-beae-c855ae00a2eb
linux /boot/vmlinuz-2.6.38 root=UUID=e1788ac9-960b-4495-beae-c855ae00a2eb ro text splash nomodeset vga=791
initrd /boot/initrd.img-2.6.38
}


But when i selected LFS , my screen was locked on black color and my PC hanged !!

druuna 08-04-2011 07:05 AM

Hi,

Code:

menuentry 'LFS livecd from HD test' {
    set root='(hd0,4)'
    linux /boot/isolinux/linux root=/dev/sda4 rw
    initrd /boot/isolinux/initramfs_data.cpio.gz
}

Although I don't know for sure where you placed the linux and initramfs files, I do believe the bold red part is incorrect.

If you followed the instructions from the article those 2 files reside in /boot and not /boot/isolinux. Check if they are at that location and if so change your grub menu entry to:
Code:

menuentry 'LFS livecd from HD test' {
    set root='(hd0,4)'
    linux  /boot/linux  root=/dev/sda4 rw
    initrd /boot/initramfs_data.cpio.gz
}

Hope this helps.

mbzadegan 08-04-2011 10:03 AM

Hi,

In my LFS Live CD image from ftp://66.135.59.49/LFS-LiveCD/lfsliv...-6.3-r2160.iso the 2 files [ linux + initramfs ] are in the isolinux folder but if you want i can move these files to boot folder .
i think that my grub scripts still has an error ,
TNX alot for your suggestions .

druuna 08-04-2011 10:32 AM

Hi again,

I wonder if you fully understand what is being done, 'cause you are looking in the wrong place.

/mnt/lfs-hd holds the copied bootable LFS liveCD files (including the linux and initramfs files in /mnt/lfs-hd/boot). Have a look at stpes 10 and 11, those clearly copy those 2 files to /mnt/lfs-hd/boot/.

After you finished all the 18 steps you can savely remove the /mnt/rootfs, /mnt/iso directories and the lfslivecd-x86-6.3-r2160.iso file. These will not be used to boot.

To create a grub menu entry you need to strip the /mnt/lfs-hd part, that part is only created as a temporary mount point. Assuming you used /dev/sda4 the following should work (same as in my previous post [#10]):
Code:

menuentry 'LFS livecd from HD test' {
    set root='(hd0,4)'
    linux  /boot/linux  root=/dev/sda4 rw
    initrd /boot/initramfs_data.cpio.gz
}

Hope this helps.

mbzadegan 08-04-2011 05:53 PM

OK , i think that i must repeat my cenario .

ONLY , i copy my LFS-LiveCD iso files to my (hd0,4) .
When i booted from (hd0,4) i can boots from my LFS kernel & initrd but at the end of my boot process these message was appeared :

The problem may be caused by the fact that ISA IDE and SCSI adapters are
no longer attempted to be autodetected. If you use such hardware, load the
proper driver manually with the "modprobe" command and exit from this shell.
For old IDE controllers, the correct module name is "ide-generic", or, if
you want to use the new libata-based driver, "pata-legacy". To avoid this
message next time you boot this CD, use a kernel command line like this:
linux load=ide-generic

This problem can be also caused by a slow SCSI controller or USB/FireWire
CD-ROM that needs more time to be detected. If you see any kernel messages
below, this is the case. In this case, it is sufficient to type "exit",
and the CD will continue the boot process. To avoid this message next
ime you boot this CD, use a kernel command line like this:
linux rootdelay=20

Dropping you to a shell.

sh-3.2#



there is not any mnt or ... folder and only my folders is :

.root , bin , dev , etc , lib , proc , root , sbin , sys

this error occur when root.ext2 did not load .

TNX alot 4 your friendly help

druuna 08-05-2011 03:20 AM

Hi,

The above shown problem is exactly the same as the one in post #4 and that was with the wrong grub entries (the lfs and isolinux parts are still present).

What is shown before the The problem may be caused by the fact that..... message? That might give us a clue, please post the +/- 5 lines before the message.

To be honest, the actions shown in the article are very straight forward. Are you sure you followed them to the letter? If you did decide to start again from step one, did you remove/delete all the old stuff before starting again?

One other question: Is your hardware (very) new or (very) old?

Hope this helps.

mbzadegan 08-05-2011 08:06 AM

Dear druuna ,

while i connected cdrom [ vs LFS_Livecd ] to my PC And reboot from (hd0,4) , My LFS boots correctly and without any fail messages .( With isolinux or grub boots correct )
It means that my LFS [ on (hd0,4) ] search for root.ext2 on the CDROM !!
And that message [ post #13 ] is in the init of initramfs while find_cd() part gets an error .

Also , we must point kernel to append root.ext2 on the hd0,4 and not on CDROM .
I hope that i could describe my problem correctly .
ok , this error message shown before of post #13 message :

hdc: ATAPI 4X CD-ROM drive, 512kB Cache, (U)DMA
Uniform CD-ROM driver Revision: 3.20

LFS LiveCD could not find its device, perhaps due to unsupported or
undetected hardware, Please fix this problem and exit shell.

The problem may be caused by the fact ...
.........................................



My PC is intel core 2 due 3Ghz

Tnx alot


All times are GMT -5. The time now is 11:51 PM.