LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 07-30-2011, 08:03 AM   #1
mbzadegan
Member
 
Registered: Jul 2011
Location: Beside of Andromeda !
Distribution: OpenBSD, RedHat, Arch, ..
Posts: 90

Rep: Reputation: Disabled
Question 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 ?

Last edited by mbzadegan; 08-03-2011 at 03:05 AM.
 
Old 07-31-2011, 03:04 AM   #2
kasl33
Member
 
Registered: Oct 2004
Location: USA
Distribution: Ubuntu-Server, Mac OS X, Arch Linux
Posts: 356

Rep: Reputation: 48
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
 
Old 07-31-2011, 05:57 AM   #3
mbzadegan
Member
 
Registered: Jul 2011
Location: Beside of Andromeda !
Distribution: OpenBSD, RedHat, Arch, ..
Posts: 90

Original Poster
Rep: Reputation: Disabled
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 .
 
Old 08-01-2011, 06:38 AM   #4
mbzadegan
Member
 
Registered: Jul 2011
Location: Beside of Andromeda !
Distribution: OpenBSD, RedHat, Arch, ..
Posts: 90

Original Poster
Rep: Reputation: Disabled
Question 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 ??

Last edited by mbzadegan; 08-03-2011 at 03:09 AM.
 
Old 08-03-2011, 03:12 AM   #5
mbzadegan
Member
 
Registered: Jul 2011
Location: Beside of Andromeda !
Distribution: OpenBSD, RedHat, Arch, ..
Posts: 90

Original Poster
Rep: Reputation: Disabled
Dear forumers , I'm Waiting for your guides ...
 
Old 08-03-2011, 04:20 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
Old 08-03-2011, 06:09 AM   #7
mbzadegan
Member
 
Registered: Jul 2011
Location: Beside of Andromeda !
Distribution: OpenBSD, RedHat, Arch, ..
Posts: 90

Original Poster
Rep: Reputation: Disabled
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 !??
 
Old 08-03-2011, 09:30 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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!
 
Old 08-04-2011, 04:45 AM   #9
mbzadegan
Member
 
Registered: Jul 2011
Location: Beside of Andromeda !
Distribution: OpenBSD, RedHat, Arch, ..
Posts: 90

Original Poster
Rep: Reputation: Disabled
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 !!

Last edited by mbzadegan; 08-04-2011 at 05:03 AM.
 
Old 08-04-2011, 07:05 AM   #10
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
Old 08-04-2011, 10:03 AM   #11
mbzadegan
Member
 
Registered: Jul 2011
Location: Beside of Andromeda !
Distribution: OpenBSD, RedHat, Arch, ..
Posts: 90

Original Poster
Rep: Reputation: Disabled
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 .
 
Old 08-04-2011, 10:32 AM   #12
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
Old 08-04-2011, 05:53 PM   #13
mbzadegan
Member
 
Registered: Jul 2011
Location: Beside of Andromeda !
Distribution: OpenBSD, RedHat, Arch, ..
Posts: 90

Original Poster
Rep: Reputation: Disabled
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

Last edited by mbzadegan; 08-04-2011 at 05:54 PM.
 
Old 08-05-2011, 03:20 AM   #14
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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.
 
Old 08-05-2011, 08:06 AM   #15
mbzadegan
Member
 
Registered: Jul 2011
Location: Beside of Andromeda !
Distribution: OpenBSD, RedHat, Arch, ..
Posts: 90

Original Poster
Rep: Reputation: Disabled
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

Last edited by mbzadegan; 08-05-2011 at 08:11 AM.
 
  


Reply

Tags
boot from hd, lfs, livecd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Load nvidia Linux driver manually, not by using X-server, possible ? Vilius Linux - Hardware 2 02-02-2009 01:36 AM
Possible to load apps manually, offline? Jeromeee Linux - Software 4 03-27-2008 08:42 PM
can't load ethernet modules manually varun_saa Mandriva 5 03-14-2007 10:16 PM
manually load m0n0wall Modules Codegen *BSD 0 03-13-2006 10:08 AM
alsa loads manually but will not load in run level kawinter Linux - Software 4 09-17-2005 03:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration