but also to store the drivers on it , to be able to boot any Linux with a kernel and it's drivers without need to have the modules also on every partition , too .
Space is not that problem nowerdays , since the drivers compiled without debugging symbols occupy only 30-100 MB disk space ( FULL Debugging 1GB and more ).
The intention is a smaller menu.lst , where to edit the kernel line from " root=/dev/sdaY " to " root=/dev/sdaX " should be enough in the grub shell .
I tried something like this in /etc/rc.d/rc.sysinit to achieve this :
Code: Select all
###+++2013-02-28 Support for mounting a boot partition containing the kernel modules
LINKTARGET=`readlink /lib/modules/$(uname -r)`
BOOTPARTITION=`echo "$LINKTARGET" | sed 's#/lib.*##'`
if [ "$BOOTPARTITION" ] ; then
echo "Using a Boot Partition"
BOOTDRIVE=`echo "$BOOTPARTITION" | grep -o -E -e 'hd[a-z][0-9]*|sd[a-z][0-9]*'`
if [ "$BOOTDRIVE" ] ; then
grep -w "$BOOTDRIVE" /proc/partitions || BOOTDRIVE='unknown';fi
if [ "$BOOTDRIVE" != 'unknown' ] ; then
BOOTPARTITION=`echo "$BOOTPARTITION" | sed 's#\(.*/[sh]d[a-z][0-9]*/\).*#\1#'` #need to be like /mnt/sda1/
rm -rf "$BOOTPARTITION"
mkdir -p "$BOOTPARTITION"
mount /dev/$BOOTDRIVE "$BOOTPARTITION"
mount
else
echo "Sorry, could not find '$BOOTDRIVE' in /proc/partitions"
fi;fi
###+++2013-02-28 Support for mounting a boot partition containing the kernel modules
/mnt/sda3/lib/modules/2.6.30.5: symbolic link to `/mnt/sda1/Kernel/Puppy-orig/2.6.30.5'
even if
Code: Select all
cd /mnt/sda3 && chroot . && depmod 2.6.30.5
Any ideas ?