Forgot to perform 'git add' on most of the files from the previous commit.
This commit is contained in:
parent
416670ca72
commit
8420232e44
31
src/.config
31
src/.config
@ -2,7 +2,7 @@
|
||||
#
|
||||
# http://kernel.org
|
||||
#
|
||||
KERNEL_SOURCE_URL=https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.6.tar.xz
|
||||
KERNEL_SOURCE_URL=http://kernel.org/pub/linux/kernel/v4.x/linux-4.4.6.tar.xz
|
||||
|
||||
# You can find the latest GNU libc source bundles here:
|
||||
#
|
||||
@ -22,32 +22,32 @@ BUSYBOX_SOURCE_URL=http://busybox.net/downloads/busybox-1.24.2.tar.bz2
|
||||
#
|
||||
# http://kernel.org/pub/linux/utils/boot/syslinux
|
||||
#
|
||||
SYSLINUX_SOURCE_URL=https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.xz
|
||||
SYSLINUX_SOURCE_URL=http://kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.xz
|
||||
|
||||
### ### ###
|
||||
### ### ###
|
||||
### ### ###
|
||||
### ### ### ###
|
||||
### ### ### ###
|
||||
### ### ### ###
|
||||
|
||||
# Use predefined '.config' file when building the kernel. This overrides the config generation
|
||||
# in '02_build_kernel.sh' and the build process uses the config file provided in this parameter.
|
||||
# You can comment, leave undefined or use nonexisting file in order to disable the property and
|
||||
# rely on automatic config generation. The file location is relative from the source folder.
|
||||
# Place the configuration file here: config_predefined/kernel.config
|
||||
#
|
||||
# KERNEL_CONFIG_FILE=path/to/predefined/kernel.config
|
||||
USE_PREDEFINED_KERNEL_CONFIG=false
|
||||
|
||||
# Use predefined '.config' file when building BusyBox. This overrides the config generation in
|
||||
# '07_build_busybox.sh' and the build process uses the config file provided in this parameter.
|
||||
# You can comment, leave undefined or use nonexisting file in order to disable the property and
|
||||
# rely on automatic config generation. The file location is relative from the source folder.
|
||||
# # Place the configuration file here: config_predefined/busybox.config
|
||||
#
|
||||
# BUSYBOX_CONFIG_FILE=path/to/predefined/busybox.config
|
||||
USE_PREDEFINED_BUSYBOX_CONFIG=false
|
||||
|
||||
# Define the overlay type to use. Possible values are 'sparse' and 'folder'. You can use any other
|
||||
# value, no value, or comment the property in order to disable it. Put your overlay content in the
|
||||
# folder '11_generate_iso' and it will be automatically merged with the root file system on boot.
|
||||
# The build process creates either '/minimal.img/rootfs' or '/minimal/rootfs' (read below) and this
|
||||
# folder contains all overlay content in it. If the boot media is writeable, then all changes on
|
||||
# the root filesystem are automatically persisted.
|
||||
# folder contains all overlay content in it. The build process also creates '/minimal.img/work'
|
||||
# or '/minimal/work'. This folder is used by the overlay driver to store modifications related
|
||||
# to the read only storage. If the overlay media is writeable, then all changes on
|
||||
# the root filesystem are automatically persisted and preserved on reboot.
|
||||
#
|
||||
# sparse - use sparse file 'minimal.img' with hardcoded maximal size of 1MB (see 11_generate_iso.sh).
|
||||
# The generated ISO image is larger because the sparse file is treated as regular file. This
|
||||
@ -60,3 +60,8 @@ SYSLINUX_SOURCE_URL=https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinu
|
||||
#
|
||||
OVERLAY_TYPE=folder
|
||||
|
||||
# Use already downloaded source bundles instead of downloading them from internet. This is useful
|
||||
# when you have already downloaded the sources and have no internet connection. Or if you want to
|
||||
# share your version of "Minimal Linux Live" with predefined sources.
|
||||
USE_LOCAL_SOURCE=false
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Cleaning up the work area..."
|
||||
echo "Cleaning up the work area. This may take a while..."
|
||||
rm -rf work
|
||||
mkdir work
|
||||
|
||||
|
@ -1,18 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
SRC_DIR=$(pwd)
|
||||
|
||||
# Grab everything after the '=' character.
|
||||
DOWNLOAD_URL=$(grep -i KERNEL_SOURCE_URL .config | cut -f2 -d'=')
|
||||
|
||||
# Grab everything after the last '/' character.
|
||||
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
|
||||
|
||||
# Read the 'USE_LOCAL_SOURCE' property from '.config'
|
||||
USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE .config | cut -f2 -d'=')"
|
||||
|
||||
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $SRC_DIR/source/$ARCHIVE_FILE ] ; then
|
||||
echo "Source bundle $SRC_DIR/source/$ARCHIVE_FILE is missing and will be downloaded."
|
||||
USE_LOCAL_SOURCE="false"
|
||||
fi
|
||||
|
||||
cd source
|
||||
|
||||
# Downloading kernel file.
|
||||
# -c option allows the download to resume.
|
||||
wget -c $DOWNLOAD_URL
|
||||
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
|
||||
# Downloading kernel source bundle file. The '-c' option allows the download to resume.
|
||||
echo "Downloading kernel source bundle from '$DOWNLOAD_URL'."
|
||||
wget -c $DOWNLOAD_URL
|
||||
else
|
||||
echo "Using local kernel source bundle $SRC_DIR/source/$ARCHIVE_FILE"
|
||||
fi
|
||||
|
||||
# Delete folder with previously extracted kernel.
|
||||
echo "Removing kernel work area..."
|
||||
rm -rf ../work/kernel
|
||||
mkdir ../work/kernel
|
||||
|
||||
|
@ -8,16 +8,24 @@ cd work/kernel
|
||||
cd $(ls -d *)
|
||||
|
||||
# Cleans up the kernel sources, including configuration files.
|
||||
echo "Preparing kernel work area..."
|
||||
make mrproper
|
||||
|
||||
# Read the 'KERNEL_CONFIG_FILE' property from '.config'
|
||||
KERNEL_CONFIG_FILE="$SRC_DIR/$(grep -i KERNEL_CONFIG_FILE $SRC_DIR/.config | cut -f2 -d'=')"
|
||||
# Read the 'USE_PREDEFINED_KERNEL_CONFIG' property from '.config'
|
||||
USE_PREDEFINED_KERNEL_CONFIG="$(grep -i USE_PREDEFINED_KERNEL_CONFIG $SRC_DIR/.config | cut -f2 -d'=')"
|
||||
|
||||
if [ -f $KERNEL_CONFIG_FILE ] ; then
|
||||
if [ "$USE_PREDEFINED_KERNEL_CONFIG" = "true" -a ! -f $SRC_DIR/config_predefined/kernel.config ] ; then
|
||||
echo "Config file $SRC_DIR/config_predefined/kernel.config does not exist."
|
||||
USE_PREDEFINED_KERNEL_CONFIG="false"
|
||||
fi
|
||||
|
||||
if [ "$USE_PREDEFINED_KERNEL_CONFIG" = "true" ] ; then
|
||||
# Use predefined configuration file for the kernel.
|
||||
cp $KERNEL_CONFIG_FILE .config
|
||||
echo "Using config file $SRC_DIR/config_predefined/kernel.config"
|
||||
cp -f $SRC_DIR/config_predefined/kernel.config .config
|
||||
else
|
||||
# Create default configuration file for the kernel.
|
||||
echo "Generating default kernel configuration..."
|
||||
make defconfig
|
||||
|
||||
# Changes the name of the system to 'minimal'.
|
||||
@ -30,10 +38,12 @@ fi
|
||||
# Compile the kernel with optimization for 'parallel jobs' = 'number of processors'.
|
||||
# Good explanation of the different kernels:
|
||||
# http://unix.stackexchange.com/questions/5518/what-is-the-difference-between-the-following-kernel-makefile-terms-vmlinux-vmlinux
|
||||
echo "Building kernel..."
|
||||
make bzImage -j $(grep ^processor /proc/cpuinfo | wc -l)
|
||||
|
||||
# Install kernel headers in './usr' (this is not '/usr') which are used later
|
||||
# when we build and configure the GNU C library (glibc).
|
||||
echo "Generating kernel headers..."
|
||||
make headers_install
|
||||
|
||||
cd ../../..
|
||||
|
@ -1,18 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
SRC_DIR=$(pwd)
|
||||
|
||||
# Grab everything after the '=' character.
|
||||
DOWNLOAD_URL=$(grep -i GLIBC_SOURCE_URL .config | cut -f2 -d'=')
|
||||
|
||||
# Grab everything after the last '/' character.
|
||||
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
|
||||
|
||||
# Read the 'USE_LOCAL_SOURCE' property from '.config'
|
||||
USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE .config | cut -f2 -d'=')"
|
||||
|
||||
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $SRC_DIR/source/$ARCHIVE_FILE ] ; then
|
||||
echo "Source bundle $SRC_DIR/source/$ARCHIVE_FILE is missing and will be downloaded."
|
||||
USE_LOCAL_SOURCE="false"
|
||||
fi
|
||||
|
||||
cd source
|
||||
|
||||
# Downloading glibc file.
|
||||
# -c option allows the download to resume.
|
||||
wget -c $DOWNLOAD_URL
|
||||
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
|
||||
# Downloading glibc source bundle file. The '-c' option allows the download to resume.
|
||||
echo "Downloading glibc source bundle from '$DOWNLOAD_URL'."
|
||||
wget -c $DOWNLOAD_URL
|
||||
else
|
||||
echo "Using local glibc source bundle $SRC_DIR/source/$ARCHIVE_FILE"
|
||||
fi
|
||||
|
||||
# Delete folder with previously extracted glibc.
|
||||
echo "Removing glibc work area..."
|
||||
rm -rf ../work/glibc
|
||||
mkdir ../work/glibc
|
||||
|
||||
|
@ -12,10 +12,12 @@ cd work/glibc
|
||||
cd $(ls -d *)
|
||||
|
||||
# Prepare working area, e.g. 'work/glibc/glibc-2.23/glibc_objects'.
|
||||
echo "Preparing glibc object area..."
|
||||
rm -rf ./glibc_objects
|
||||
mkdir glibc_objects
|
||||
|
||||
# Prepare installation area, e.g. 'work/glibc/glibc-2.23/glibc_installed'.
|
||||
# Prepare install area, e.g. 'work/glibc/glibc-2.23/glibc_installed'.
|
||||
echo "Preparing glibc install area..."
|
||||
rm -rf ./glibc_installed
|
||||
mkdir glibc_installed
|
||||
cd glibc_installed
|
||||
@ -27,12 +29,15 @@ cd ../glibc_objects
|
||||
# glibc is configured to use the root folder (--prefix=) and as result all libraries
|
||||
# will be installed in '/lib'. Kernel headers are taken from our already prepared
|
||||
# kernel header area (see 02_build_kernel.sh). Packages 'gd' and 'selinux' are disabled.
|
||||
echo "Configuring glibc..."
|
||||
../configure --prefix= --with-headers=$WORK_KERNEL_DIR/usr/include --without-gd --without-selinux --disable-werror
|
||||
|
||||
# Compile glibc with optimization for "parallel jobs" = "number of processors".
|
||||
echo "Building glibc..."
|
||||
make -j $(grep ^processor /proc/cpuinfo | wc -l)
|
||||
|
||||
# Install glibc in the installation area, e.g. 'work/glibc/glibc-2.23/glibc_installed'.
|
||||
echo "Installing glibc..."
|
||||
make install DESTDIR=$GLIBC_INSTALLED -j $(grep ^processor /proc/cpuinfo | wc -l)
|
||||
|
||||
cd ../../..
|
||||
|
@ -25,14 +25,14 @@ cd glibc_installed
|
||||
# | |
|
||||
# | +--asm-generic (kernel)
|
||||
# | |
|
||||
# | +--asm-generic (kernel)
|
||||
# | |
|
||||
# | +--linux (kernel)
|
||||
# | |
|
||||
# | +--mtd (kernel)
|
||||
# |
|
||||
# +--lib (glibc)
|
||||
|
||||
echo "Preparing glibc..."
|
||||
|
||||
mkdir -p usr
|
||||
cd usr
|
||||
|
||||
|
@ -1,18 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
SRC_DIR=$(pwd)
|
||||
|
||||
# Grab everything after the '=' character.
|
||||
DOWNLOAD_URL=$(grep -i BUSYBOX_SOURCE_URL .config | cut -f2 -d'=')
|
||||
|
||||
# Grab everything after the last '/' character.
|
||||
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
|
||||
|
||||
# Read the 'USE_LOCAL_SOURCE' property from '.config'
|
||||
USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE .config | cut -f2 -d'=')"
|
||||
|
||||
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $SRC_DIR/source/$ARCHIVE_FILE ] ; then
|
||||
echo "Source bundle $SRC_DIR/source/$ARCHIVE_FILE is missing and will be downloaded."
|
||||
USE_LOCAL_SOURCE="false"
|
||||
fi
|
||||
|
||||
cd source
|
||||
|
||||
# Downloading busybox source.
|
||||
# -c option allows the download to resume.
|
||||
wget -c $DOWNLOAD_URL
|
||||
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
|
||||
# Downloading BusyBox source bundle file. The '-c' option allows the download to resume.
|
||||
echo "Downloading BusyBox source bundle from '$DOWNLOAD_URL'."
|
||||
wget -c $DOWNLOAD_URL
|
||||
else
|
||||
echo "Using local BusyBox source bundle $SRC_DIR/source/$ARCHIVE_FILE"
|
||||
fi
|
||||
|
||||
# Delete folder with previously extracted busybox.
|
||||
echo "Removing BusyBox work area..."
|
||||
rm -rf ../work/busybox
|
||||
mkdir ../work/busybox
|
||||
|
||||
|
@ -15,16 +15,24 @@ cd work/busybox
|
||||
cd $(ls -d *)
|
||||
|
||||
# Remove previously generated artifacts.
|
||||
echo "Preparing BusyBox work area..."
|
||||
make distclean
|
||||
|
||||
# Read the 'BUSYBOX_CONFIG_FILE' property from '.config'
|
||||
BUSYBOX_CONFIG_FILE="$SRC_DIR/$(grep -iBUSYBOX_CONFIG_FILE $SRC_DIR/.config | cut -f2 -d'=')"
|
||||
# Read the 'USE_PREDEFINED_BUSYBOX_CONFIG' property from '.config'
|
||||
USE_PREDEFINED_BUSYBOX_CONFIG="$(grep -i USE_PREDEFINED_BUSYBOX_CONFIG $SRC_DIR/.config | cut -f2 -d'=')"
|
||||
|
||||
if [ -f $BUSYBOX_CONFIG_FILE ] ; then
|
||||
if [ "$USE_PREDEFINED_BUSYBOX_CONFIG" = "true" -a ! -f $SRC_DIR/config_predefined/busybox.config ] ; then
|
||||
echo "Config file $SRC_DIR/config_predefined/busybox.config does not exist."
|
||||
USE_PREDEFINED_BUSYBOX_CONFIG="false"
|
||||
fi
|
||||
|
||||
if [ "$USE_PREDEFINED_BUSYBOX_CONFIG" = "true" ] ; then
|
||||
# Use predefined configuration file for Busybox.
|
||||
cp $BUSYBOX_CONFIG_FILE .config
|
||||
echo "Using config file $SRC_DIR/config_predefined/busybox.config"
|
||||
cp -f $SRC_DIR/config_predefined/busybox.config .config
|
||||
else
|
||||
# Create default configuration file.
|
||||
echo "Generating default BusyBox configuration..."
|
||||
make defconfig
|
||||
|
||||
# The 'inetd' applet fails to compile because we use the glibc installation area as
|
||||
@ -41,9 +49,11 @@ GLIBC_INSTALLED_ESCAPED=$(echo \"$GLIBC_INSTALLED\" | sed 's/\//\\\//g')
|
||||
sed -i "s/.*CONFIG_SYSROOT.*/CONFIG_SYSROOT=$GLIBC_INSTALLED_ESCAPED/" .config
|
||||
|
||||
# Compile busybox with optimization for "parallel jobs" = "number of processors".
|
||||
echo "Building BusyBox..."
|
||||
make busybox -j $(grep ^processor /proc/cpuinfo | wc -l)
|
||||
|
||||
# Create the symlinks for busybox. The file 'busybox.links' is used for this.
|
||||
echo "Generating BusyBox based initramfs area..."
|
||||
make install
|
||||
|
||||
cd ../../..
|
||||
|
@ -10,6 +10,7 @@ cd ../../../..
|
||||
|
||||
cd work
|
||||
|
||||
echo "Preparing initramfs work area..."
|
||||
rm -rf rootfs
|
||||
|
||||
cd busybox
|
||||
|
@ -1,8 +1,8 @@
|
||||
::sysinit:/etc/bootscript.sh
|
||||
::restart:/sbin/init
|
||||
::shutdown:echo "Syncing file buffers..."
|
||||
::shutdown:/bin/sync
|
||||
::shutdown:echo "Unmounting all filesystems..."
|
||||
::shutdown:echo "Sync file buffers..."
|
||||
::shutdown:sync
|
||||
::shutdown:echo "Unmount all filesystems..."
|
||||
::shutdown:umount -a -r
|
||||
::ctrlaltdel:/sbin/reboot
|
||||
::once:cat /etc/welcome.txt
|
||||
|
@ -3,8 +3,14 @@
|
||||
echo "Welcome to \"Minimal Linux Live\" (/init)"
|
||||
|
||||
# Let's mount all core file systems.
|
||||
/etc/prepare.sh
|
||||
/etc/01_prepare.sh
|
||||
|
||||
# Now let's create new mountpoint in RAM and make it our new root location.
|
||||
exec /etc/switch.sh
|
||||
# Create new mountpoint in RAM, make it our new root location and overlay it
|
||||
# with our storage area (if overlay area exists at all). This operation invokes
|
||||
# the script '/etc/03_switch.sh' as the new init process.
|
||||
exec /etc/02_overlay.sh
|
||||
|
||||
echo "(/init) - you can never see this unless there is a serious bug..."
|
||||
|
||||
# Wait until any key has been pressed.
|
||||
read -n1 -s
|
||||
|
@ -8,6 +8,7 @@ rm -f rootfs.cpio.gz
|
||||
cd rootfs
|
||||
|
||||
# Packs the current 'initramfs' folder structure in 'cpio.gz' archive.
|
||||
echo "Packing initramfs..."
|
||||
find . | cpio -R root:root -H newc -o | gzip > ../rootfs.cpio.gz
|
||||
|
||||
cd ../..
|
||||
|
@ -1,18 +1,33 @@
|
||||
#!/bin/sh
|
||||
|
||||
SRC_DIR=$(pwd)
|
||||
|
||||
# Grab everything after the '=' character.
|
||||
DOWNLOAD_URL=$(grep -i SYSLINUX_SOURCE_URL .config | cut -f2 -d'=')
|
||||
|
||||
# Grab everything after the last '/' character.
|
||||
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
|
||||
|
||||
# Read the 'USE_LOCAL_SOURCE' property from '.config'
|
||||
USE_LOCAL_SOURCE="$(grep -i USE_LOCAL_SOURCE .config | cut -f2 -d'=')"
|
||||
|
||||
if [ "$USE_LOCAL_SOURCE" = "true" -a ! -f $SRC_DIR/source/$ARCHIVE_FILE ] ; then
|
||||
echo "Source bundle $SRC_DIR/source/$ARCHIVE_FILE is missing and will be downloaded."
|
||||
USE_LOCAL_SOURCE="false"
|
||||
fi
|
||||
|
||||
cd source
|
||||
|
||||
# Downloading Syslinux file.
|
||||
# -c option allows the download to resume.
|
||||
wget -c $DOWNLOAD_URL
|
||||
if [ ! "$USE_LOCAL_SOURCE" = "true" ] ; then
|
||||
# Downloading SYSLINUX source bundle file. The '-c' option allows the download to resume.
|
||||
echo "Downloading SYSLINUX source bundle from '$DOWNLOAD_URL'."
|
||||
wget -c $DOWNLOAD_URL
|
||||
else
|
||||
echo "Using local SYSLINUX source bundle $SRC_DIR/source/$ARCHIVE_FILE"
|
||||
fi
|
||||
|
||||
# Delete folder with previously extracted Syslinux.
|
||||
echo "Removing SYSLINUX work area..."
|
||||
rm -rf ../work/syslinux
|
||||
mkdir ../work/syslinux
|
||||
|
||||
|
@ -15,12 +15,15 @@ WORK_SYSLINUX_DIR=$(pwd)
|
||||
cd ../../..
|
||||
|
||||
# Remove the old ISO file if it exists.
|
||||
echo "Removing old ISO image..."
|
||||
rm -f minimal_linux_live.iso
|
||||
|
||||
# Remove the old ISO generation area if it exists.
|
||||
echo "Removing old ISO image work area..."
|
||||
rm -rf work/isoimage
|
||||
|
||||
# This is the root folder of the ISO image.
|
||||
echo "Preparing ISO image work area..."
|
||||
mkdir work/isoimage
|
||||
cd work/isoimage
|
||||
|
||||
@ -80,7 +83,7 @@ if [ "$OVERLAY_TYPE" = "sparse" -a "$(id -u)" = "0" ] ; then
|
||||
# Copy the overlay content.
|
||||
cp -r $SRC_DIR/11_generate_iso/* sparse/rootfs/
|
||||
|
||||
# Unmount the sparse file and thelete the temporary folder.
|
||||
# Unmount the sparse file and delete the temporary folder.
|
||||
$BUSYBOX umount sparse
|
||||
rm -rf sparse
|
||||
|
||||
@ -95,7 +98,9 @@ elif [ "$OVERLAY_TYPE" = "folder" ] ; then
|
||||
mkdir -p minimal/rootfs
|
||||
mkdir -p minimal/work
|
||||
|
||||
cp -r $SRC_DIR/11_generate_iso/* minimal/rootfs/
|
||||
cp -rf $SRC_DIR/11_generate_iso/* minimal/rootfs/
|
||||
else
|
||||
echo "Generated ISO image will have no overlay structure."
|
||||
fi
|
||||
|
||||
# Create ISOLINUX configuration file.
|
||||
|
@ -17,6 +17,8 @@ clean:
|
||||
@rm -rf work
|
||||
@echo "Removing generated ISO image..."
|
||||
@rm -f minimal_linux_live.iso
|
||||
@echo "Removing predefined configuration files..."
|
||||
@rm -f config_predefined/*.config
|
||||
@echo "Removing build log file..."
|
||||
@rm -f minimal_linux_live.log
|
||||
|
||||
|
7
src/generate_hdd.sh
Executable file
7
src/generate_hdd.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Create sparse file of 20MB which can be used by QEMU.
|
||||
|
||||
rm -f hdd.img
|
||||
truncate -s 20M hdd.img
|
||||
|
@ -1,9 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
qemu-system-i386 -m 64M -cdrom minimal_linux_live.iso -boot d
|
||||
# Use this script without arguments to run the generated ISO image with QEMU.
|
||||
# If you pass '-hdd' or '-h' the virtual hard disk 'hdd.img' will be attached.
|
||||
# Note that this virtual hard disk has to be created in advance. You can use
|
||||
# the script 'generate_hdd.sh' to generate the hard disk image file. Once you
|
||||
# have hard disk image, you can use it as overlay device and persist all your
|
||||
# changes. See the '.config' file for more information on the overlay support.
|
||||
|
||||
# Use this when you want to play with hard disk content. You can manually create
|
||||
# sparse file (/minimal.img) and put overlay content (/minimal.img/rootfs) in it.
|
||||
#
|
||||
# qemu-system-i386 -m 64M -hda hdd.img -cdrom minimal_linux_live.iso -boot d
|
||||
if [ "$1" = "-hdd" -o "$1" = "-h" ] ; then
|
||||
echo "Starting QEMU with attached ISO image and hard disk."
|
||||
qemu-system-i386 -m 64M -hda hdd.img -cdrom minimal_linux_live.iso -boot d
|
||||
else
|
||||
echo "Starting QEMU with attached ISO image."
|
||||
qemu-system-i386 -m 64M -cdrom minimal_linux_live.iso -boot d
|
||||
fi
|
||||
|
||||
|
@ -1,8 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
qemu-system-x86_64 -m 64M -cdrom minimal_linux_live.iso -boot d
|
||||
# Use this script without arguments to run the generated ISO image with QEMU.
|
||||
# If you pass '-hdd' or '-h' the virtual hard disk 'hdd.img' will be attached.
|
||||
# Note that this virtual hard disk has to be created in advance. You can use
|
||||
# the script 'generate_hdd.sh' to generate the hard disk image file. Once you
|
||||
# have hard disk image, you can use it as overlay device and persist all your
|
||||
# changes. See the '.config' file for more information on the overlay support.
|
||||
|
||||
if [ "$1" = "-hdd" -o "$1" = "-h" ] ; then
|
||||
echo "Starting QEMU with attached ISO image and hard disk."
|
||||
qemu-system-x86_64 -m 64M -hda hdd.img -cdrom minimal_linux_live.iso -boot d
|
||||
else
|
||||
echo "Starting QEMU with attached ISO image."
|
||||
qemu-system-x86_64 -m 64M -cdrom minimal_linux_live.iso -boot d
|
||||
fi
|
||||
|
||||
# Use this when you want to play with hard disk content. You can manually create
|
||||
# sparse file (/minimal.img) and put overlay content (/minimal.img/rootfs) in it.
|
||||
#
|
||||
# qemu-system-x86_64 -m 64M -hda hdd.img -cdrom minimal_linux_live.iso -boot d
|
||||
|
Loading…
x
Reference in New Issue
Block a user