1 AUTHOR: JanJorre Laurens <darkrealm [dot] drjj [at] gmail [dot] com>
5 LICENSE: GNU Free Documentation License Version 1.2
7 SYNOPSIS: How to create a LFS installation if you haven't got a lot of space
10 This hint describes a way to create an (nA)LFS system if you don't have any space
11 on your LFS system. For this hint you do need a second (possibly windows)
12 computer with enough space for the compilation.
19 - This hint requires that you have sufficient knowledge of LinuxFromScratch.
21 - This hint requires that you have a second windows (preferably XP) PC and a
22 network connection between the 2 computers.
24 - This hint assumes you use the LFS LiveCD but any host system with smbfs /
28 ---------------------------------
29 | CONFIGURING YOUR WINDOWS SYSTEM |
30 ---------------------------------
32 First thing we have to do is configure your windows system. Since the only
33 windows system i have is a windows XP OS, i can only explain how to do it for
34 Windows XP, if someone has a diffrent windows version feel free to email me
35 the instructions on how to set up a similar situation on that os.
39 First thing you have to do is find a partition on your computer with atleast
40 6 GB of free space (10 GB is recommended).
42 Create a folder called LFSDATA.
43 Share it by right clicking on the folder and clicking on properties.
44 Select the Sharing tab
45 Make sure that the box next to 'Share this folder on the network' and
46 'allow network users to change my files' are checked in
47 Make sure the share is called LFSDATA
49 Your windows system is now setup :-)
51 -----------------------------------------------
52 | CREATE AND MOUNT ALL THE DIFFRENT FILESYSTEMS |
53 -----------------------------------------------
55 Alright, this is the more difficult part. First lets create the share mount point
59 Then, mount the share using smbmount:
60 smbmount //[YOUR_WINDOWS_XP_IP]/LFSDATA LFSDATA
62 What we have to do now is create 3 files with an ext2 filesystem. The reason for
63 this is: permissions. Especially when you use nALFS, this can be a real problem
64 if you use a direct windows XP share with a windows XP filesystem. So :-) lets
67 dd if=/dev/zero of=/mnt/LFSDATA/root bs=1M count=2045
68 dd if=/dev/zero of=/mnt/LFSDATA/tools bs=1M count=2045
69 dd if=/dev/zero of=/mnt/LFSDATA/sources bs=1M count=2045
71 Then, create the filesystems inside those files:
73 mkfs.ext2 /mnt/LFSDATA/root
74 mkfs.ext2 /mnt/LFSDATA/tools
75 mkfs.ext2 /mnt/LFSDATA/sources
77 With these 3 commands you will get the following error message:
79 mke2fs 1.37 (21-Mar-2005)
80 root is not a block special device.
84 The next step is to mount it all:
87 mount /mnt/LFSDATA/root /mnt/lfs -o loop
89 mount /mnt/LFSDATA/tools /mnt/lfs/tools -o loop
90 mkdir /mnt/lfs/tools/packages-6.1.1
91 mount /mnt/LFSDATA/sources /mnt/lfs/packages-6.1.1 -o loop
97 Well - as the title already says :-) its now time to run the book or the nALFS
98 script and any additions you want. Except do not do the chapter 2, 8 and 9 parts :-)
104 Well - you are almost done :-) the only thing you have to do now is copy all
105 the files you created in the 'root' file to your true partition. It is now time
106 for a slightly modified version of chapter 2 ;-)
108 First you will have to unmount all the unneccesarry bits. This means
109 /tools/packages-6.1.1 and /tools (if you have created any other temperary mounts
110 you have to unmount them aswell)
112 umount /mnt/lfs/tools/packages-6.1.1
113 umount /mnt/lfs/tools
116 Then you have to create a partition. I assume you know how to do this and
117 otherwise check chapter 2 of the LFS book.
119 For now i assume your new partition has the device node /dev/hda1. If it does
120 not change the commands where neccesary.
122 Now you will have to create a temporary mountpoint for the host partition:
125 mount /dev/hda1 /mnt/tmp
127 Then, copy the contents of /mnt/lfs to /mnt/tmp:
128 cp /mnt/lfs/* /mnt/tmp -pr
130 and unmount the lfs and tmp mounts and remount /dev/hda1 to /mnt/lfs
133 mount /dev/hda1 /mnt/lfs
135 Then it is now time to chroot back into /mnt/lfs and do chapter 8 and 9.
137 Thats it :-) I hope its of some use to somebody out there :-)