You are on page 1of 3

AUTHOR: Mahesh Kumar <maheshkumar@rocketmail.com> and <mahesh.kumarrr@gmail.

com>
DATE: 2011.04.28
LICENSE: GNU Free Documentation License Version 1.2
SYNOPSIS: Install LFS livecd to hard disk
PRIMARY URI: http://tips4ever.blogspot.com/
DESCRIPTION:
Contents
------------
1. What is the idea?
2. Installing Process
HINT:
1. What is the idea?
-----------------
The Idea is to build your Own Linux Operating System is fast and Pure bu
ild with LFS LiveCD when compare with any other third-party Linux Distributions.
But tasking with LiveCD is complicated in some times. Build your Own Linux with
out LiveCD by Install it into Hard disk just 2GB partation. And Most of the Peop
le like to taste the LFS Linux before go to Build. For that this Idea was born.
2. Installing Process
------------------
1. Boot from an existing Linux distro or any live-cd
2. Download the LFS LiveCD iso from http://www.Linuxfromscratch.org/livecd/d
ownload.html
3. Use exist Partition or make a new Partition of your harddisk (ERASING AL
L DATA)
mahesh@tips4ever$ echo ",,b,*" | sfdisk /dev/sdX or we know tool
Note: sdX should be replaced with the block device name of your harddisk (s
da1 or hda1)
4. Format the newly partitioned disk
mahesh@tips4ever$ mkfs.ext2 /dev/sdX1
5. Create a folder for mounting the new disk
mahesh@tips4ever$ mkdir /mnt/lfs-hd
6. Mount the new partition
mahesh@tips4ever$ mount /dev/sdX1 /mnt/lfs-hd
7. Create a directory to mount the LFS LiveCD iso file
mahesh@tips4ever$ mkdir /mnt/iso
8. Mount the lfslivecd-x86-6.3-r2160.iso
mahesh@tips4ever$ mount -o ro,loop lfslivecd-x86-6.3-r2160.iso /mnt/iso
Note: Change lfslivecd-x86-6.3-r2160.iso to match the iso file you downl
oaded
9. Create a Folder for "boot" on path "/mnt/lfs-hd/"
mahesh@tips4ever$ mkdir /mnt/lfs-hd/boot
10. Copy the /mnt/iso/boot/isoLinux/Linux to /mnt/lfs-hd/boot
mahesh@tips4ever$ cp /mnt/iso/boot/isoLinux/Linux /mnt/lfs-hd/boot
11. Copy /mnt/iso/boot/isoLinux/initramfs_data.cpio.gz to /mnt/lfs-hd/boot
mahesh@tips4ever$ cp /mnt/iso/boot/isoLinux/initramfs_data.cpio.gz /mnt/
lfs-hd/boot
12. Create a folder for mounting the root.ext2 ( It is compressed ext2 filesy
stem it will uncompressed to RAM and run as live lfs-cd )
mahesh@tips4ever$ mkdir /mnt/rootfs
13. Mount root.ext2 to /mnt/rootfs
mahesh@tips4ever$ mount /mnt/iso/root.ext2 /mnt/rootfs -o loop
14. Copy all /mnt/rootfs file and folders to /mnt/lfs-hd
mahesh@tips4ever$ cp -Rvf /mnt/rootfs/* /mnt/lfs-hd
15. Use exist Linux grub bootloader file form step 17 or Create folder for bo
otloder
mahesh@tips4ever$ mkdir /mnt/lfs-hd/boot/grub
16. Copy /boot/grub/{stage1,stage2,fat_stage1_5} to /mnt/lfs-hd/boot/grub
mahesh@tips4ever$ cp /boot/grub/{stage1,stage2,fat_stage1_5} /mnt/lfs-hd
/boot/grub
17. Create a file named /mnt/lfs-hd/boot/grub/menu.lst with the following con
tent
default 0
title LFS HD
root (hdX,Y)
kernel /boot/Linux root=/dev/sdaX
initrd /boot/initramfs_data.cpio.gz
title Windows
rootnoverify (hd0,0)
chainloader +1
Note: Replace sdaX with your lfs harddisk some PC have hdaX (x is partition
number).
18. Unmount your harddisk
mahesh@tips4ever$ umount /mnt/sdaX
19. Start grub with the command "grub"
20. Enter the grub command root (hdX,Y) it is root hard disk for the
21. Enter the grub command setup (hdX).
Note that you do NOT include the Y partition number
22. Enter the grub command "quit"
23. You are done. Try booting from the key now
ACKNOWLEDGEMENTS:
Source to this content:
Idea for Grub Installation:
*Grub www.gnu.org/software/grub/manual/html_node/index.html
Idea for Remastering Partation & Mounting CD/DVD & HDD's:
*LFS-backup www.Linuxfromscratch.org/hints/downloads/files/lfsbackup.txt
*LFS-liveusb http://www.rodneybeede.com/Booting_the_Linux_From_Scratch_LiveCD_fr
om_a_usb_key_drive.html
Basic Linux Commands Help:
*Rute-Linux http://rute.2038bug.com/node22.html.gz
Alternative content Link:
*http://tips4ever.blogspot.com/2010/08/install-lfs-livecd-to-harddisk.html
CHANGELOG:
[2011-04.-28]
* First Relese
NOTE:
Before Doing it keep a backup of your Important files. It successfully worked on
Intel Core,1GB RAM, 160GB sata(sda) HDD and LFS 6.3 LiveCD and Ubuntu Linux 8.0
4 Linux in A150 Netbook. Do it your own risk. Be careful with AMD Processer beca
use I'm not tested.

You might also like