Skip to content
Browse files

HUGE commit!

Please read the NEWS file for details regarding this commit.
All changes in this commit are availble on 1.6.4-alpha3 codename 'Indiana Jones'
  • Loading branch information...
1 parent 7d23a53 commit 8d26d3b3b80f2da12231be02eaeec0d978d441fe @Ratler Ratler committed
View
9 Makefile
@@ -60,6 +60,11 @@ $(ISO_SOURCE)/aaa_base/aaa_base.tar.bz2:
@echo "Creating aaa_base.tar.bz2"
@scripts/aaa_base
+prebuild: prepare $(ISO_TARGET)/.prebuild
+$(ISO_TARGET)/.prebuild:
+ @echo "Running prebuild process"
+ @scripts/prebuild
+
rebuild: etc $(ISO_TARGET)/.rebuild
$(ISO_TARGET)/.rebuild:
@echo "Starting rebuild process"
@@ -70,7 +75,7 @@ $(ISO_TARGET)/.etcf:
@echo "Copying miscfiles"
@scripts/etc
-toolset: $(ISO_SOURCE)/template/moonbase.tar.bz2 $(ISO_SOURCE)/template/$(ISO_LUNAR_MODULE).tar.bz2
+toolset: prebuild $(ISO_SOURCE)/template/moonbase.tar.bz2 $(ISO_SOURCE)/template/$(ISO_LUNAR_MODULE).tar.bz2
$(ISO_SOURCE)/template/moonbase.tar.bz2 $(ISO_SOURCE)/template/$(ISO_LUNAR_MODULE).tar.bz2:
@echo "Getting a proper moonbase"
@scripts/toolset
@@ -108,8 +113,10 @@ prepare:
clean:
umount BUILD/dev &> /dev/null || true
umount BUILD/proc &> /dev/null || true
+ umount BUILD/sys &> /dev/null || true
rm -rf BUILD
rm -rf initrd/BUILD initrd/initrd
+ rm -rf spool cache
rm -rf aaa_base aaa_dev
rm -rf memtest
rm -rf kernels/TAR kernels/*.tar.bz2 kernels/.kernels kernels/.initrd_kernels
View
57 NEWS
@@ -1,3 +1,60 @@
+20080914 1.6.4-alpha3 ratler
+ * Alpha release 3
+
+ - Fixed issue with packages showing up twice in state/lunar/packages
+ - udev should now install fine inside the BUILD chroot
+ - Remove bits/syscall.h before lin -c glibc since glibc does a file
+ and compare check during make install that decide it's unchanged
+ and not installing it
+ - scripts/aaa_base: Removed explicit kernel-headers-X.X from packages
+ file generation, kernel-headers are already listed in base.list-X.X
+ - Auto-generate copyright year for isolinux files
+ - Added rootdelay=10 to kernel options for isolinux, let usb settle
+ before probing for devices containing the installation
+ - Kernel config bumped to 2.6.26.5
+ - Initrd:
+ - Support booting installation from any media. For example you can
+ put syslinux on a usb stick and copy initrd and kernel from the
+ iso, and then put the iso it self on the usb-stick and boot away.
+ It's also possible to put the .iso in the root of any mountable
+ partition (a script will be available later to bootstrap this)
+ - No more udev/rules.d template, instead take rules.d from the installed
+ udev and wash them to make them work properly with the initrd
+ - Installer:
+ - Disable staticly defined mount point in fstab that match a user
+ defined mount point during partition selection (currently only /tmp)
+ - Further improvements to the language menu to also include territory
+ for each encoding
+ - Detect protected device (won't show up in the partition selection),
+ this is the device where the .iso reside for the alternative installation
+ method
+ - Added initd.disable.list file in conf/ that contain services that should
+ be disabled by default
+ - Added grub and md fixes from ElAngelo
+
+20080909 1.6.4-alpha2 ratler
+ * Alpha 1 & 2 release
+
+ - Updated initrd to support new udev
+ - Added udev rules.d files to template (Will automate this later)
+ - Updated font selection code in the installer
+ - Rewrote language menu in the installer, gather locales
+ from the current glibc install
+ - Module changes:
+ - vixie-cron -> cronie
+ - links2 -> links
+
+Unreleased moe
+ * Testing ISO
+
+ - Added make target precheck (to download all required sources)
+ - Added make target prebuild (to generate all build caches)
+ - Removed a couple of outdated packages
+ - Replaced iputils with inetutils (no docbook on the ISO)
+ - scripts/rebuild: Use mount --bind
+ - scripts/rebuild: Removed makedev
+ - scripts/rebuild: Added dependency cache generation
+
20070210 1.6.1 sofar
* Final release of 1.6.1 for both i686 and x86_64
View
5 README
@@ -47,11 +47,12 @@ The same goes for the sources, they end up in spool/
Here's a brief explanation of the make targets:
+prepare download all the required sources
init setup the buildroot
dirs make LSB dirs and a few more needed
-moonbase fetch a copy of moonbase.tar.bz2 and install it
+toolset fetch a copy of moonbase.tar.bz2 and install it
unpack extract the cache tar.bz2's
-etcf copy the template files that are not provided by modules
+etc copy the template files that are not provided by modules
rebuild rebuild all modules at least once
aaa_base create a tarball with required but untracked files
aaa_dev create static device nodes needed by iso and initrd
View
2 conf/base.list
@@ -46,7 +46,6 @@ reiserfsprogs
shadow
jfsutils
bash_static
-raidtools
findutils
pciutils
hdparm
@@ -57,7 +56,6 @@ rsync
zile
ntfsprogs
dosfstools
-tnftp
dhcpcd
wipe
dmidecode
View
4 conf/config.in
@@ -5,6 +5,10 @@
# copy this file to 'config' and edit your settings as needed
+# Which arch are we compiling for? Hint: i868 or x86-64
+
+ISO_ARCH = i686
+
# the ISO major version number
ISO_MAJOR = 1.6.2
View
22 conf/extended.list
@@ -1,7 +1,3 @@
-Python
-libxml2
-tcl
-libpthread-stubs
perl
m4
autoconf
@@ -20,16 +16,10 @@ dbus
dbus-glib
hal
hal-info
-tiff
-shared-mime-info
-gamin
intltool
-numpy
nasm
texinfo
flex
-dbh
-Time-HiRes
TimeDate
URI
binutils
@@ -51,7 +41,7 @@ iproute2
iptables
ppp
xinetd
-iputils
+inetutils
check
lftp
make
@@ -60,22 +50,16 @@ wpa_supplicant
rp-pppoe
pppconfig
nfs-utils
-links2
+links
lard
joe
irssi
gccmakedep
-irqbalance
-libdaemon
ifplugd
gcc
ccache
heirloom-mailx
pcmciautils
-alsa-lib
-alsa-utils
-vixie-cron
-microcode
-microcode_ctl
+cronie
netcat
usbutils
View
5 conf/initd.disable.list
@@ -0,0 +1,5 @@
+nfs
+nfslock
+iptables
+xinetd
+portmap
View
7 conf/sources.list-2.6
@@ -1,6 +1,5 @@
linux-2.6
ndiswrapper
-ieee80211
-ipw3945
-ipw3945d
-ipw3945-ucode
+iwlwifi-3945-ucode
+iwlwifi-4965-ucode
+mc
View
2 initrd/initrd.list
@@ -1,10 +1,12 @@
bin/basename
bin/bash
bin/cat
+bin/cut
bin/echo
bin/grep
bin/ls
bin/mkdir
+bin/mknod
bin/mount
bin/more
bin/pgrep
View
26 initrd/initrd.list-2.6
@@ -1,17 +1,21 @@
-etc/udev/rules.d/05-udev-early.rules
-etc/udev/rules.d/75-persistent-net-generator.rules
-etc/udev/rules.d/95-udev-late.rules
-etc/udev/rules.d/50-udev.rules
-etc/udev/rules.d/60-cdrom_id.rules
-etc/udev/rules.d/60-persistent-storage.rules
-etc/udev/rules.d/60-persistent-input.rules
-etc/udev/rules.d/75-cd-aliases-generator.rules
-etc/udev/scripts.d/raid-devfs.sh
-etc/udev/udev.conf
lib/module-init-tools/bin/lsmod sbin/
lib/module-init-tools/sbin/depmod sbin/
lib/module-init-tools/sbin/insmod sbin/
lib/module-init-tools/sbin/modprobe sbin/
lib/module-init-tools/sbin/rmmod sbin/
-sbin/udevstart
+lib/udev/firmware.sh
+lib/udev/rule_generator.functions
+lib/udev/cdrom_id
+lib/udev/scsi_id
+lib/udev/usb_id
+lib/udev/ata_id
+lib/udev/create_floppy_devices
+lib/udev/vol_id
+lib/udev/path_id
+lib/udev/edd_id
+lib/udev/write_net_rules
+lib/udev/write_cd_rules
+lib/udev/fstab_import
+lib/udev/collect
+sbin/udevadm
sbin/udevd
View
1 initrd/template/etc/group
@@ -0,0 +1 @@
+root:x:0:
View
128 initrd/template/sbin/init
@@ -3,7 +3,7 @@
#
# Parts (C) K. Sallee 2002
# Parts (C) K. Kongar 2002,2003
-# Parts (C) Lunar-Linux 2002-2007
+# Parts (C) Lunar-Linux 2002-2008
#
# This document is licensed under the GPL
#
@@ -16,6 +16,10 @@ is_26()
esac
}
+is_lunar_iso()
+{
+ test -e /mnt/cdrom/.lunar-cd
+}
shell()
{
@@ -55,6 +59,14 @@ auto_load_modules()
{
MODULES=$(discover --data-path=linux/module/name --format="%s" --data-version=`uname -r` fixeddisk optical removabledisk tape)
+ # Load filesystems and loop
+ IFS=$' \t\n'
+ FS_MOD="reiserfs fat vfat xfs iso9660 loop"
+ for i in $FS_MOD; do
+ modprobe $i 2> /dev/null
+ done
+ IFS=$'\t\n'
+
if [ -z "$1" ]; then
MODULES=`$DIALOG --inputbox "The following modules will be attempted to load. Press enter to load them, or edit the list manually. To cancel select 'Cancel'." 10 60 "$MODULES"`
fi
@@ -97,25 +109,65 @@ load_modules()
done
}
+scan_block_devices()
+{
+ cat /proc/partitions | sed -e '1,2d' -e 's; * ; ;g' | cut -d' ' -f5 | sed -e 's;^;/dev/;'
+}
scan_cdroms()
{
if [ -z "$LUNAR_CD" ]; then
DEVICES=$(for DEV in cdrom dvd {{hd,sd,ub}{a,b,c,d,e,f,g,h},s{r,g},cdroms/cdrom}{,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15} ; do if [ -e /dev/$DEV ]; then echo /dev/$DEV ; fi ; done)
- for DEVICE in $DEVICES; do
- mount -n -r $DEVICE /mnt -t iso9660 2>/dev/null
- if [ -e "/mnt/.lunar-cd" ]; then
- umount -n /mnt 2>/dev/null
+ for DEVICE in $DEVICES; do
+ mount -n -r $DEVICE /mnt/cdrom -t iso9660 2>/dev/null
+ if is_lunar_iso; then
+ umount -n /mnt/cdrom 2>/dev/null
LUNAR_CD=$DEVICE
break
else
(( COUNT++ ))
- umount -n /mnt 2>/dev/null
+ umount -n /mnt/cdrom 2>/dev/null
fi
done
fi
}
+mount_iso()
+{
+ local iso dev
+ iso=$1
+
+ if mount -n -t iso9660 -o loop,ro,exec $iso /mnt/cdrom 2> /dev/null; then
+ if is_lunar_iso; then
+ LUNAR_CD=$iso
+ OPTIONS="loop,ro,exec"
+ umount /mnt/cdrom 2> /dev/null
+ return
+ else
+ umount /mnt/cdrom 2> /dev/null
+ fi
+ fi
+}
+
+scan_for_iso()
+{
+ if [ -z "$LUNAR_CD" ]; then
+ DEVICES=$(scan_block_devices)
+ for dev in $DEVICES; do
+ if mount -n -t auto -o ro $dev /mnt/device 2> /dev/null; then
+ for iso in /mnt/device/*.iso /mnt/device/*.ISO; do
+ if [ -e $iso ]; then
+ mount_iso $iso
+ fi
+ if [ -n "$LUNAR_CD" ]; then
+ return
+ fi
+ done
+ fi
+ umount /mnt/device 2> /dev/null
+ done
+ fi
+}
show_filesystems()
{
@@ -134,6 +186,28 @@ select_root()
OPTIONS=`$DIALOG --nocancel --inputbox "Please enter mounting options" 10 60 "defaults,ro"`
}
+create_node()
+{
+ if [ ! -e "$2" ]; then
+ mknod -m "$1" "$2" "$3" "$4" "$5"
+ fi
+}
+
+init_udev()
+{
+ mount -n -t ramfs none /dev
+ create_node 600 /dev/console c 5 1
+ create_node 666 /dev/null c 1 3
+ create_node 660 /dev/ram0 b 1 0
+
+ for i in 0 1 2 3 4; do
+ create_node 600 /dev/tty"$i" c 5 "$i"
+ done
+ for i in 0 1 2 3; do
+ create_node 600 /dev/ttyS"$i" c 4 "$(($i + 64))"
+ done
+}
+
main_menu()
{
@@ -143,17 +217,18 @@ main_menu()
D_HELP="Continue boot process."
scan_cdroms
+ scan_for_iso
if [ -z "$LUNAR_CD" ] && [ -z "$ROOT" ]; then
- HELP="Load the additional PCI/IDE/SCSI kernel module(s) to be able to detect and read the Lunar-Linux CDROM."
- DEFAULT_ITEM="A"
- elif [ -z "$ROOT" ]; then
- HELP="Lunar-Linux Install/Rescue CDROM is detected on $LUNAR_CD"
- DEFAULT_ITEM="C"
- else
- HELP="You have selected to mount $ROOT as the root file system."
- DEFAULT_ITEM="C"
- fi
+ HELP="Load the additional PCI/IDE/SCSI kernel module(s) to be able to detect and read the Lunar-Linux CDROM."
+ DEFAULT_ITEM="A"
+ elif [ -z "$ROOT" ]; then
+ HELP="Lunar-Linux Install/Rescue CDROM is detected on $LUNAR_CD"
+ DEFAULT_ITEM="C"
+ else
+ HELP="You have selected to mount $ROOT as the root file system."
+ DEFAULT_ITEM="C"
+ fi
COMMAND=`$DIALOG --title "Initrd Menu" --nocancel --item-help \
--default-item "$DEFAULT_ITEM" --menu "$HELP" 0 0 0 \
@@ -175,7 +250,6 @@ main_menu()
}
-
main()
{
while true ; do
@@ -193,18 +267,17 @@ main()
if [ -z "$OPTIONS" ]; then
OPTIONS="defaults,ro"
fi
-
- if mount -n -t $VFSTYPE -o $OPTIONS $ROOT /mnt && [ -x /mnt/sbin/init ]; then
+ if mount -n -t $VFSTYPE -o $OPTIONS $ROOT /mnt/cdrom && [ -x /mnt/cdrom/sbin/init ]; then
is_26 && pkill udevd || pkill devfsd
sleep 1
umount -n /dev
is_26 && umount -n /sys
umount -n /proc
- pivot_root /mnt /mnt
+ pivot_root /mnt/cdrom /mnt/cdrom
exec chroot / /sbin/init
else
$DIALOG --msgbox "Unable to locate /sbin/init on $ROOT." 0 0
- umount -n /mnt
+ umount -n /mnt/cdrom
main_menu $*
fi
done
@@ -213,11 +286,12 @@ main()
skipinitrd()
{
- auto_load_modules fast
- scan_cdroms
- main $*
-}
+ auto_load_modules fast
+ scan_cdroms
+ scan_for_iso
+ main $*
+}
export PATH=/bin:/usr/bin:/sbin:/usr/sbin
export IFS=$'\t\n'
@@ -234,8 +308,10 @@ KERNEL=`uname -r`
is_26 && (
mount -n -t sysfs sysfs /sys
- mount -n -t ramfs none /dev
- /sbin/udevstart
+ init_udev
+ /sbin/udevd --daemon
+ /sbin/udevadm trigger
+ /sbin/udevadm settle
) || (
mount -n -t devfs devfs /dev
devfsd /dev &
View
2 isolinux/f1.txt
@@ -1,7 +1,7 @@
Lunar-%VERSION%.iso, 0c%CODENAME% (%DATE%)07, kernel %KERNEL%
-0eWelcome07 to 05Lunar Linux07 Copyright (C) 2007 by the
+0eWelcome07 to 05Lunar Linux07 Copyright (C) %COPYRIGHTYEAR% by the
09Lunar-Linux team <maintainer@lunar-linux.org>07
All Rights Reserved.
View
2 isolinux/f2.txt
@@ -1,7 +1,7 @@
Lunar-%VERSION%.iso, 0c%CODENAME% (%DATE%)07, kernel %KERNEL%
-0eWelcome07 to 05Lunar Linux07 Copyright (C) 2007 by the
+0eWelcome07 to 05Lunar Linux07 Copyright (C) %COPYRIGHTYEAR% by the
09Lunar-Linux team <maintainer@lunar-linux.org>07
All Rights Reserved.
View
2 isolinux/f3.txt
@@ -1,7 +1,7 @@
Lunar-%VERSION%.iso, 0c%CODENAME% (%DATE%)07, kernel %KERNEL%
-0eWelcome07 to 05Lunar Linux07 Copyright (C) 2007 by the
+0eWelcome07 to 05Lunar Linux07 Copyright (C) %COPYRIGHTYEAR% by the
09Lunar-Linux team <maintainer@lunar-linux.org>07
All Rights Reserved.
View
2 isolinux/f4.txt
@@ -1,7 +1,7 @@
Lunar-%VERSION%.iso, 0c%CODENAME% (%DATE%)07, kernel %KERNEL%
-0eWelcome07 to 05Lunar Linux07 Copyright (C) 2007 by the
+0eWelcome07 to 05Lunar Linux07 Copyright (C) %COPYRIGHTYEAR% by the
09Lunar-Linux team <maintainer@lunar-linux.org>07
All Rights Reserved.
View
4 isolinux/isolinux.cfg.in
@@ -1,5 +1,5 @@
DEFAULT install
-APPEND read-only load_ramdisk=1 ramdisk_size=INITRDSIZE initrd=initrd root=/dev/ram0 prompt_ramdisk=0
+APPEND read-only load_ramdisk=1 ramdisk_size=INITRDSIZE initrd=initrd root=/dev/ram0 prompt_ramdisk=0 rootdelay=10
DISPLAY f1.txt
TIMEOUT 600
PROMPT 1
@@ -14,7 +14,7 @@ F8 f1.txt
F9 f1.txt
LABEL install
KERNEL linux
- APPEND read-only load_ramdisk=1 ramdisk_size=INITRDSIZE initrd=initrd root=/dev/ram0 prompt_ramdisk=0 vga=ask skipinitrd
+ APPEND read-only load_ramdisk=1 ramdisk_size=INITRDSIZE initrd=initrd root=/dev/ram0 prompt_ramdisk=0 vga=ask rootdelay=10 skipinitrd
LABEL linux
KERNEL linux
APPEND read-only load_ramdisk=1 ramdisk_size=INITRDSIZE initrd=initrd root=/dev/ram0 prompt_ramdisk=0 vga=ask
View
1,004 kernels/conf/2.6/base
674 additions, 330 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
73 lunar-install/sbin/lunar-install
@@ -6,6 +6,7 @@
# portions Copyright 2002 by rodzilla #
# portions Copyright 2003-2004 by tchan, kc8apf #
# portions Copyright 2004-2007 by Auke Kok #
+# portions Copyright 2008 by Stefan Wold #
# #
#############################################################
# #
@@ -245,8 +246,12 @@ block_devices()
list_block_devices()
{(
export IFS=$' \t\n'
- local DEVICE FDEVICE
- for DEVICE in $(tail +3 /proc/partitions | awk '{print $4}') ; do
+ local DEVICE FDEVICE PDEVICE
+
+ # Grab protected device when booting iso from other media then cdrom
+ PDEVICE=$(basename `grep '/mnt/device' /proc/mounts | cut -d' ' -f1` 2> /dev/null)
+
+ for DEVICE in $(tail +3 /proc/partitions | awk '{print $4}' | grep -v -e ${PDEVICE:-^$} -e loop); do
FDEVICE=$(lsh unmap_device /dev/$DEVICE)
# if the device node ends with [0-9] then it's never a disc
if [[ $DEVICE =~ '[0-9]$' ]]; then
@@ -295,7 +300,7 @@ menu_list_targets()
*Reiser*) PTYPE="(reiserfs)" ;;
*) PTYPE="(unknown)" ;;
esac
-
+
for (( N=0 ; N<${#PARTITIONS[@]} ; N++ )); do
if [ "$(echo ${PARTITIONS[$N]} | cut -d: -f1)" == "$DEVICE" ]; then
FSTYPE=$(echo ${PARTITIONS[$N]} | cut -d: -f2)
@@ -303,7 +308,7 @@ menu_list_targets()
FSTYPE=${FSTYPE/none/swap}
echo "$FSTYPE partition, size $FSIZE"
continue 2
- fi
+ fi
done
echo "unassigned, size $FSIZE, $PTYPE"
fi
@@ -380,7 +385,7 @@ menu_get_filesystem()
{
TITLE="Filesystem Selection Menu"
HELP="Please select a filesystem. A '*' means that this is a journalling filesystem, which provides better data security against system crashes etc."
-
+
EXT3="Third Extended file system (*)"
EXT2="Second Extended file system"
REISER="Reiserfs file system (*)"
@@ -456,7 +461,7 @@ partition_discs()
"fdisk" "$FDISK" \
"parted" "$PARTED"`
;;
- esac &&
+ esac &&
PROMPT="Are you certain that you want to run $PROG on $DISC? (This will erase any partition selection you might have already performed)" &&
if confirm "$PROMPT"; then
unset PARTITIONS
@@ -644,7 +649,7 @@ raid_setup()
# udev might fail to create these devices
if [ ! -b /dev/md/${ARRAYNAME/md/} ]; then
mkdir -p /dev/md
- mknod -m 660 /dev/md/${ARRAYNAME/md/} b 9 ${$ARRAYNAME/md/}
+ mknod -m 660 /dev/md/${ARRAYNAME/md/} b 9 ${ARRAYNAME/md/}
chgrp disc /dev/md/${ARRAYNAME/md/}
ln -s md/${ARRAYNAME/md/} /dev/$ARRAYNAME
fi
@@ -655,7 +660,7 @@ raid_setup()
mdadm --create --level $LEVEL -n ${#DISCS_A[@]} -x ${#SPARE_A[@]} /dev/$ARRAYNAME ${DISCS_A[@]} ${SPARE_A[@]}
sleep 2
if ! grep -qw "^$ARRAYNAME" /proc/mdstat ; then
-
+
sleep 5
msgbox "Initialization and starting of the RAID array failed. You should inspect the output for errors and try manually to start the array before using it."
else
@@ -808,6 +813,10 @@ make_lilo_conf()
is_26 || echo "append=\"devfs=nomount\""
echo "read-only"
echo ""
+ if [ ! echo $BOOT | grep -qw md ]; then
+ BOOTDISCS=$(mdadm --detail $BOOT | tail -n2 | awk '{print $7}')
+ echo "raid-extra-boot=$(echo $BOOTDISCS | sed s@\ @,@g)"
+ fi
echo "boot=$DISC"
echo "root=$ROOT"
echo ""
@@ -849,7 +858,7 @@ install_grub()
GRUB_PART=$(lsh map_device_to_grub $BOOT)
# and we go straight to the MBR
GRUB_MBR=$(echo $GRUB_PART | cut -d, -f1)
-
+
(
echo "root ($GRUB_PART)"
echo "setup ($GRUB_MBR)"
@@ -906,7 +915,7 @@ transfer()
msgbox "You should now be ready to install lunar to your system. Lunar will now create filesystems if needed, make a swapfile if it was selected, and install all lunar packages to the newly setup system. Make sure you are done with partitioning and filesystem selection."
if confirm "Are you ready to install lunar?" ; then
clear
-
+
ORDER=$(for (( N=0 ; N<${#PARTITIONS[@]} ; N++ )); do echo ${PARTITIONS[$N]} | cut -d: -f2 ; done | sort)
for MOUNTPOINT in $ORDER; do
@@ -920,6 +929,11 @@ transfer()
CHECK=$(echo ${PARTITIONS[$N]} | cut -d: -f6)
FORCE=$(echo ${PARTITIONS[$N]} | cut -d: -f7)
FORMAT=$(echo ${PARTITIONS[$N]} | cut -d: -f8)
+ # handle /tmp, TODO: Automatic fstab scanning for all mountpints
+ if [ "$MOUNTPOINT" == "/tmp" ]; then
+ TMP_TMPFS_NO=1
+ fi
+
# handle swap
if [ "$FSYS" == "swap" ]; then
echo "Setting up swap on $PART..."
@@ -1090,6 +1104,10 @@ transfer()
cp etc/fstab etc/fstab-
fi
+ if [ -n "$TMP_TMPFS_NO" ]; then
+ sed -i 's;^tmpfs.*/tmp;#&;' etc/fstab
+ fi
+
echo -e "$FSTAB" >> etc/fstab
make_lilo_conf
make_grub_conf
@@ -1098,17 +1116,24 @@ transfer()
cp /etc/lunar.release $TARGET/etc/
echo " LUNAR_MODULE=lunar" > $TARGET/etc/lunar/local/config
cp /etc/lunar/local/.config* $TARGET/etc/lunar/local/
-
+
# initialize the new machine:
touch $TARGET/var/log/{btmp,utmp,wtmp,lastlog}
chmod 0644 $TARGET/var/log/{utmp,wtmp,lastlog}
chmod 0600 $TARGET/var/log/btmp
-
+
+ # disable some services
+ if [ -e /.initd.disable.list ]; then
+ while read INITD; do
+ chroot_run /sbin/chkconfig --del $INITD
+ done < /.initd.disable.list
+ fi
+
# really we are done now ;^)
) | $DIALOG --title " Installing Lunar-Linux " --gauge "" 10 70 0
cd /
-
+
if (( STEP == 6 )); then
(( STEP++ ))
fi
@@ -1187,7 +1212,7 @@ show_consolefonts()
{
FONTDIR="/usr/share/consolefonts"
cd $FONTDIR
- FONTS=`ls *.gz | sed "s/\.psf\.gz//"`
+ FONTS=`ls *.{psf,psfu}.gz | sed -r "s/\.psfu?\.gz//"`
for FONT in $FONTS; do
echo $FONT
@@ -1213,11 +1238,15 @@ font_menu()
show_languages()
{
- while read L D; do
- echo "$L" | cut -d/ -f1
- echo "$D"
- shift 2
- done < /etc/lunar/local/locales
+ local IFS
+ IFS=$' \t\n'
+ locale -a -v | egrep "(locale:|language \||territory \|)" |
+ sed -r 's;archive:.*|locale:|language \| |territory \|;;g' |
+ awk '{printf $0 ; printf " "} NR % 3 == 0 {print " "}' |
+ while read locale language territory; do
+ echo "$locale"
+ echo "$language ($territory)"
+ done
}
@@ -1303,7 +1332,7 @@ install_kernels()
KCOMMAND=`$DIALOG --title "Kernel selection menu" --cancel-label "Exit" --default-item "P" --item-help --menu "In order to succesfully run linux you need to install the linux kernel, the heart of the operating system. You can choose between compiling one yourself or select a precompiled modular kernel." 0 0 0 \
"P" "Install a precompiled kernel" "Fast and safe: these kernels should work on almost all machines" \
"C" "Compile a kernel" "Custom configure and compile one of the linux kernels"`
-
+
if [ $? != 0 ]; then
return
fi
@@ -1449,7 +1478,7 @@ to make sure that applications running are using the correct
time zone information and adjust daylight savings."
SH[15]="You are done! you should remove the ISO from the
cd-rom tray and reboot. See you at the login prompt!"
-
+
B_LABEL="One step back"
B_HELP="Go back one step in the installation procedure"
F_LABEL="One step forward"
@@ -1488,7 +1517,7 @@ cd-rom tray and reboot. See you at the login prompt!"
K_LABEL="Install kernel(s)"
K_HELP="Install kernel(s) on the new installation"
K_OK="\\Z1"
-
+
R_LABEL="Set root password"
R_HELP="Set root password needed to access this system (the default password is empty)"
R_OK="\\Z1"
View
11 scripts/aaa_base
@@ -1,17 +1,10 @@
#!/bin/bash
-umount $ISO_TARGET/proc &> /dev/null
-umount $ISO_TARGET/dev &> /dev/null
-
. /etc/lunar/config
unset VERBOSE
echo "+ cleaning up (some) file structure items"
-rm -f $ISO_TARGET/etc/rc*/*nfslock
-rm -f $ISO_TARGET/etc/rc*/*nfs
-rm -f $ISO_TARGET/etc/rc*/*xinetd
-rm -f $ISO_TARGET/etc/rc*/*serial
-rm -f $ISO_TARGET/etc/rc*/*portmap
+#rm -f $ISO_TARGET/etc/rc?.d/{*nfs,*xinetd,*serial,*portmap}
rm -rf $ISO_TARGET/var/cache/ccache/*
rmdir /usr/lib/locale/*
chroot $ISO_TARGET ccache -C
@@ -27,7 +20,7 @@ rm -f $ISO_TARGET/etc/mtab
echo "+ creating list of prepackaged modules"
mkdir -p $ISO_SOURCE/aaa_base
> $ISO_SOURCE/aaa_base/packages
-for mod in $(cat conf/base.list conf/base.list-${ISO_KSUFFIX} conf/extended.list) kernel-headers-${ISO_KSUFFIX} ; do
+for mod in $(cat conf/base.list conf/base.list-${ISO_KSUFFIX} conf/extended.list); do
grep "^$mod:" $ISO_TARGET/var/state/lunar/packages >> $ISO_SOURCE/aaa_base/packages
done
View
3 scripts/etc
@@ -20,6 +20,9 @@ cp $ISO_TARGET/etc/skel/.vimrc $ISO_TARGET/root/
# random misc stuff
mkdir -p $ISO_TARGET/var/lock/subsys
+# /dev/null is required when some lunar core functions are called
+mknod -m 666 $ISO_TARGET/dev/null c 1 3
+
# rerun ldconfig to make sure we're not stale
touch $ISO_TARGET/etc/ld.so.conf
chroot $ISO_TARGET ldconfig
View
23 scripts/initrd
@@ -2,6 +2,11 @@
. /etc/lunar/config
+if [ -e /proc/modules ] && ! grep -qs "loop" /proc/devices; then
+ modprobe loop
+ grep -qs loop /proc/devices || echo "Bailing out, "loop" driver is missing"
+fi
+
cd $ISO_SOURCE/initrd
umount $ISO_TARGET/dev &> /dev/null
@@ -14,7 +19,7 @@ rm -rf BUILD
# template first
cp -a --no-dereference template BUILD
find BUILD -type d -name '.svn' -exec rm -rf {} \; >/dev/null 2>&1
-mkdir -p BUILD/{mnt,proc,var/lib/discover,usr}
+mkdir -p BUILD/{mnt/cdrom,mnt/device,proc,var/lib/discover,usr}
if [ "$ISO_KSUFFIX" == "2.6" ]; then
mkdir BUILD/sys
fi
@@ -46,6 +51,15 @@ transfer()
$ISO_SOURCE/scripts/ldd-gather $ISO_SOURCE/initrd/initrd.list-$ISO_KSUFFIX | transfer
)
+echo "+ copying and setting up udev rules"
+(
+ cd $ISO_TARGET
+ cp --no-dereference -r etc/udev $ISO_SOURCE/initrd/BUILD/etc/
+ for i in $ISO_SOURCE/initrd/BUILD/etc/udev/rules.d/*; do
+ sed -i 's;GROUP=".*";;g' $i
+ done
+)
+
# bare minimum of device nodes
echo "+ filling /dev"
@@ -91,8 +105,11 @@ for KERNEL in linux safe ; do
cd TMP
tar xjf $ISO_SOURCE/kernels/TAR/$KVER.tar.bz2
mkdir -p $ISO_SOURCE/initrd/BUILD/lib/modules/$KVER/kernel/drivers/
+ mkdir -p $ISO_SOURCE/initrd/BUILD/lib/modules/$KVER/kernel/fs/
echo "+ cp -a --no-dereference lib/modules/$KVER/kernel/drivers/{block,md,ata,ide,scsi,usb/host} $ISO_SOURCE/initrd/BUILD/lib/modules/$KVER/kernel/drivers/"
cp -a --no-dereference lib/modules/$KVER/kernel/drivers/{block,md,ata,ide,scsi,usb/host} $ISO_SOURCE/initrd/BUILD/lib/modules/$KVER/kernel/drivers/
+ echo "+ cp -a --no-dereference lib/modules/$KVER/kernel/drivers/fs/{nls,fat,vfat,reiserfs,xfs,ext4} $ISO_SOURCE/initrd/BUILD/lib/modules/$KVER/kernel/fs/"
+ cp -a --no-dereference lib/modules/$KVER/kernel/fs/{nls,fat,vfat,reiserfs,xfs,ext4} $ISO_SOURCE/initrd/BUILD/lib/modules/$KVER/kernel/fs/
echo "+ cp lib/modules/$KVER/modules.* $ISO_SOURCE/initrd/BUILD/lib/modules/$KVER/"
cp lib/modules/$KVER/* $ISO_SOURCE/initrd/BUILD/lib/modules/$KVER/
echo "+ depmod -b $ISO_SOURCE/initrd/BUILD -a -F $ISO_SOURCE/kernels/$KERNEL.map $KVER"
@@ -110,7 +127,7 @@ for ITEM in $(find BUILD -type d -name ".svn" | tac); do
done
chown -R root:root BUILD/*
-
+
echo "+ running ldconfig"
chroot BUILD /sbin/ldconfig &&
rm -f BUILD/etc/mtab &&
@@ -127,7 +144,7 @@ sed "s/INITRDSIZE/$SIZE/g" $ISO_SOURCE/isolinux/isolinux.cfg.in > $ISO_SOURCE/is
dd if=/dev/zero of=initrd.raw bs=1024 count=$SIZE &&
losetup /dev/loop/0 initrd.raw &&
-mkfs.ext2 -b 1024 -m 0 -i 1024 -N 512 /dev/loop/0 &&
+mkfs.ext2 -b 1024 -m 0 -i 1024 -N 768 /dev/loop/0 &&
mkdir BUILD.mnt &&
mount /dev/loop/0 BUILD.mnt &&
cp -a BUILD/* BUILD.mnt/ &&
View
12 scripts/isofs
@@ -2,6 +2,13 @@
. /etc/lunar/config
+echo "+ Checking if cdrtools is installed"
+if ! lsh module_installed cdrtools; then
+ echo "Cdrtools missing: installing..."
+ lin -c cdrtools
+ lsh module_installed cdrtools || exit 1
+fi
+
echo "+ tagging release version"
echo "Lunar Linux $ISO_CNAME" > $ISO_TARGET/etc/lunar.release
echo "lunar" > $ISO_TARGET/etc/hostname
@@ -47,13 +54,16 @@ cp $ISO_SOURCE/template/README $ISO_TARGET
echo "+ copying motd"
cp $ISO_SOURCE/template/motd $ISO_TARGET/etc/
cp $ISO_SOURCE/template/motd.target $ISO_TARGET/etc/
+echo "+ copying initd disable list"
+cp $ISO_SOURCE/conf/initd.disable.list $ISO_TARGET/.initd.disable.list
for file in $ISO_TARGET/isolinux/{f{1,2,3,4}.txt,boot.cat,isolinux.{bin,cfg}} $ISO_TARGET/etc/motd $ISO_TARGET/etc/motd $ISO_TARGET/sbin/lunar-install $ISO_TARGET/README $ISO_TARGET/etc/motd $ISO_TARGET/etc/motd.target ; do
sed -i -e "s:%VERSION%:${ISO_VERSION}:g" \
-e "s:%CODENAME%:${ISO_CODENAME}:g" \
-e "s:%DATE%:${ISO_DATE}:g" \
-e "s:%KERNEL%:${ISO_PVER}:g" \
- -e "s:%CNAME%:${ISO_CNAME}:g" $file
+ -e "s:%CNAME%:${ISO_CNAME}:g" \
+ -e "s:%COPYRIGHTYEAR%:${ISO_DATE:0:4}:g" $file
done
# reverse approach this:
View
10 scripts/kernels
@@ -1,7 +1,7 @@
#!/bin/bash
-mv /etc/localtime /etc/localtime-
-ln -sf /usr/share/zoneinfo/UTC /etc/localtime
+#mv /etc/localtime /etc/localtime-
+#ln -sf /usr/share/zoneinfo/UTC /etc/localtime
echo "+ Starting compile of kernels"
. /etc/lunar/config
@@ -90,7 +90,7 @@ build_kernel()
{
echo "+ building $VERSION$1"
cd $ISO_SOURCE/kernels/linux-$VERSION
- yes n | make oldconfig &&
+ echo | make oldconfig &&
if [ "${ISO_KSUFFIX}" = "2.4" ]; then
make dep || exit 1
fi &&
@@ -161,5 +161,5 @@ fi
mv $ISO_SOURCE/kernels/.kernels-tmp $ISO_SOURCE/kernels/.kernels
mv $ISO_SOURCE/kernels/.initrd_kernels-tmp $ISO_SOURCE/kernels/.initrd_kernels
-rm -f /etc/localtime
-mv /etc/localtime- /etc/localtime
+#rm -f /etc/localtime
+#mv /etc/localtime- /etc/localtime
View
19 scripts/prebuild
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+. /etc/lunar/config
+export VERBOSE=off
+
+LISTS="conf/base.list conf/base.list-$ISO_KSUFFIX conf/extended.list"
+MODULES="$(cat $LISTS) ${ISO_LUNAR_MODULE} kernel-headers-$ISO_KSUFFIX"
+
+for MODULE in $MODULES ; do
+ if ! module_installed $MODULE ; then
+ echo "Compiling module $MODULE since we're missing a valid cache tarball"
+ /sbin/lin -c $MODULE
+ elif module_is_expired $MODULE ; then
+ echo "Compiling module $MODULE since it is out of date"
+ /sbin/lin -c $MODULE
+ else
+ echo "Module $MODULE appears to be installed and has a valid cache"
+ fi
+done
View
3 scripts/proper
@@ -70,9 +70,6 @@ done
echo "+ stripping binaries"
find $ISO_TARGET -name "lib*.so*" -exec strip {} \; 2> /dev/null
-echo "+ archiving locale"
-cp $ISO_TARGET/var/lib/lunar/moonbase/*/glibc/locales $ISO_TARGET/etc/lunar/local/
-
# moonbase
echo "+ archiving moonbase"
if [ -d $ISO_TARGET/var/lib/lunar/moonbase ] ; then (
View
77 scripts/rebuild
@@ -19,23 +19,57 @@ export BOOTLOADER=none
mkdir -p $ISO_TARGET/usr/src/
-mount -t proc proc $ISO_TARGET/proc
+# Lets get a full-featured environment FIXME: No failsafes!
+function mount_system_fs ()
+{
+ echo "$ISO_TARGET"
+ for mpoint in proc sys dev ; do
+ mount --bind /${mpoint} $ISO_TARGET/${mpoint} &> /dev/null
+ done
+}
+
+function umount_system_fs ()
+{
+ for mpoint in proc sys dev ; do
+ if ! umount $ISO_TARGET/${mpoint} &> /dev/null ; then
+ umount -l -f $ISO_TARGET/${mpoint} &> /dev/null
+ fi
+ done
+}
+
+# iptables needs the current kernel sources
+function compile_iptables ()
+{
+ echo "Setting up kernel directory"
+ mkdir -p $ISO_TARGET/usr/src/linux
+ mount --bind /usr/src/linux $ISO_TARGET/usr/src/linux
+
+ echo "Compiling iptables"
+ chroot $ISO_TARGET /sbin/lin -c iptables
+
+ echo "Resetting kernel directory"
+ umount $ISO_TARGET/usr/src/linux
+ rm -rf $ISO_TARGET/usr/src/linux
+}
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo "+ STARTING CONFIGURING MODULES +"
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo ""
-for mod in $(cat conf/base.list conf/base.list-${ISO_KSUFFIX} conf/extended.list) ; do
- yes '' | NEVER_ASK=y chroot $ISO_TARGET /sbin/lin --deps $mod
-done
+mount_system_fs &&
-umount $ISO_TARGET/proc &> /dev/null
-chroot $ISO_TARGET lin makedev
-mount -t proc proc $ISO_TARGET/proc
+# We have no dependency cache or status file
+echo "Creating preliminary dependency index and cache"
+chroot $ISO_TARGET lsh create_module_index
+chroot $ISO_TARGET lsh create_depends_cache
+#exit 0
+# glibc is special
+chroot $ISO_TARGET /sbin/lin --deps --reconfigure glibc
-chroot $ISO_TARGET /dev/install-devices.sh
-chroot $ISO_TARGET rm -rf /var/build/makedev-*
+for mod in $(cat conf/base.list conf/base.list-${ISO_KSUFFIX} conf/extended.list | grep -v glibc | grep -v perl) ; do
+ yes '' | NEVER_ASK=y chroot $ISO_TARGET /sbin/lin --deps --reconfigure $mod
+done
case ${ISO_KSUFFIX} in
2.4)
@@ -46,7 +80,7 @@ case ${ISO_KSUFFIX} in
;;
esac
-chroot $ISO_TARGET lin kernel-headers-${ISO_KSUFFIX}
+chroot $ISO_TARGET /sbin/lin kernel-headers-${ISO_KSUFFIX}
# install core tools manually, since we can't download
@@ -57,12 +91,24 @@ echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
echo ""
# perl is notoriously problematic and needs to be built before glibc
-chroot $ISO_TARGET lin perl
-
-for mod in $(cat conf/base.list conf/base.list-${ISO_KSUFFIX} conf/extended.list) ; do
- chroot $ISO_TARGET /sbin/lin -c $mod
+chroot $ISO_TARGET /sbin/lin -c perl
+chroot $ISO_TARGET /sbin/lin -c glibc
+chroot $ISO_TARGET /sbin/lin -c gcc
+
+# Compile everything but iptables (see next paragraph)
+for mod in `lsh sort_by_dependency $(cat conf/base.list conf/base.list-${ISO_KSUFFIX} conf/extended.list | grep -v iptables)` ; do
+ if [ "$mod" == "glibc" ]; then
+ # Remove bits/syscall.h or it will be missing on the iso
+ rm -f $ISO_TARGET/usr/include/bits/syscall.h
+ chroot $ISO_TARGET /sbin/lin -c $mod
+ else
+ chroot $ISO_TARGET /sbin/lin -c $mod
+ fi
done
+# We need to setup a special environment for iptables to compile in
+compile_iptables &&
+
# openssh installs ssh keys so these are now tracked in the module :^(
chroot $ISO_TARGET /sbin/lin -c openssh
# e2fsprogs nabs /etc/mtab
@@ -78,7 +124,6 @@ echo "Broken compiles:"
(cd $ISO_TARGET/usr/src/ && ls -1)
echo ""
-umount $ISO_TARGET/proc
+umount_system_fs &&
touch $ISO_TARGET/.rebuild
-
View
8 scripts/unpack
@@ -3,14 +3,14 @@
. /etc/lunar/config
export VERBOSE=off
-resurrect ()
+resurrect_mod ()
{
CACHE=$1-$(module_version $1)-$ISO_BUILD.tar.bz2
if [ ! -f cache/$CACHE ] ; then
echo -e "\n! $1: $CACHE missing"
else
echo -n "+"
- tar xjf cache/$CACHE -C $ISO_TARGET > /dev/null 2>&1
+ tar xf cache/$CACHE -C $ISO_TARGET > /dev/null 2>&1
echo "$1:$ISO_DATE:installed:$(module_version $1):" >> $ISO_TARGET/var/state/lunar/packages
echo "$1:$ISO_DATE:installed:$(module_version $1):" >> $ISO_TARGET/var/state/lunar/packages.backup
fi
@@ -20,11 +20,11 @@ resurrect ()
# unpack all the ISO required var/cache/lunar tarballs
# in case of file conflict preserve glibc and gcc files first!
for mods in ${ISO_LUNAR_MODULE} $(cat conf/base.list conf/base.list-$ISO_KSUFFIX conf/extended.list) ; do
- resurrect $mods
+ resurrect_mod $mods
done
# we need kernel headers too
-resurrect kernel-headers-$ISO_KSUFFIX
+#resurrect_mod kernel-headers-$ISO_KSUFFIX
# fill var/spool/lunar dir
for mod in $(cat conf/sources.list conf/sources.list-${ISO_KSUFFIX} conf/base.list conf/base.list-${ISO_KSUFFIX} conf/extended.list) ; do

0 comments on commit 8d26d3b

Please sign in to comment.
Something went wrong with that request. Please try again.