Quote:
Originally Posted by uppman
ljones, have you tried this metod? It should work in most cases with the huge kernel.
You can boot from the installation DVD and start you USB-stick from there.
/Magnus
|
Nope, not tried it yet. I must admit to have never even used grub, I'd have to try to find out how to use it. I wonder if it can be put on a USB Stick, maybe it works better than syslinux? (no idea!).
Speaking of syslinux and USB sticks I went right back and redid the whole thing, started from scratch, 32 bit only initrd & vmlinuz.
I tried booting the finished result on a 64 bit system.
Here's roughly what I did;
1. Do a minimal (32 bit) (only the stuff out of slackware 'a', so no 'ap','x' etc) install to hard drive (hda1). Edited /etc/fstab and changed the first line from "/dev/hda1" to "/dev/root". Note that this time around I used a real 32 bit system to do this on, before I was using qemu to try to do the same thing.
2. Tar'd everything installed (from hda1), moved the file to a clean (empty) USB stick (USB Stick partitioned with 2 partitions; sda1 as a small fat32 partition, sda2, linux).
3. Untar back to the USB stick from the tar file onto sda2.
4. Wipe hard drive, do a more thorough install and made a brief script;
Code:
#!/bin/sh
oldhome=`pwd`
cd /boot
rm -r -f /boot/initrd-tree
rm /boot/initrd.gz
mkinitrd
cd initrd-tree
rm bin/awk
rm bin/cut
cp /lib/libblkid.so.1 lib/
cp /lib/libext2fs.so.2 lib/
cp /lib/libc.so.6 lib/
cp /lib/libuuid.so.1 lib/
cp /lib/libcom_err.so.2 lib/
cp /lib/ld-linux.so.2 lib/
cp /lib/libpthread.so.0 lib/
cp /lib/libdl.so.2 lib/
cp /lib/libm.so.6 lib/
cp /usr/bin/awk bin/
cp /sbin/blkid sbin/
cp /bin/cut bin/
cd /boot
installpkg -root /boot/initrd-tree /root/files/devs-2.3.1-noarch-25.t?z
cp /root/files/init_13.0.txt /boot/initrd-tree/init
mkinitrd
cd $oldhome
Note that I had the init_13.0.txt in the /root/files dir as well as the devs package.
5. made directory syslinux on the usb stick's fat 32 partition (sda1) and copied /boot/initrd.gz into it along with the already existing /boot/vmlinuz as installed there by slackware itself.
6. Then did syslinux -s /dev/sda1
7. Unmount, remove USB stick from 32 bit system plug into 64 bit and try it out - !
I went back to a normal 32 bit vmlinuz and initrd.gz, but the result was that it still didn't find the partiton and I got dumped out to a command line. The USB stick's linux partition (sda2) this time I named "USB".
After getting dropped out to a command line I tried to look at the init_13.0.txt script to try to see if anything's amiss there.
Here's the results after typing 'set';
(Might be typos from here on as I've had to type these manually off a digital camera - !).
Code:
BOOT_IMAGE='vmlinuz'
HOME='/'
IFS='
'
OPTIND='1'
PATH='/sbin:/usr/sbin:/bin:/usr/bin'
PPID='1'
PS1='\w \$'
PS2='> '
PS4='+ '
PWD='/'
TERM='linux'
_='clear'
initrd='initrd.gz'
label="USB"
So I was looking through the init script and saw stuff, such as ....
Code:
INITRD=`cat /initrd-name`
#ROOTDEV=`cat /rootdev`
#ROOTFS=`cat /rootfs`
LUKSDEV=`cat /luksdev`
RESUMEDEV=`cat /resumedev`
WAIT=`cat /wait-for-root`
KEYMAP=`cat /keymap`
Doing these manually, e.g. cat /initrd-name produced the same result, nothing!
I see after this the script uses a variable called ARG,i.e.
Code:
# Parse command line
for ARG in `cat /proc/cmdline`; do
case $ARG in
rescue)
RESCUE=1
..
echoing $ARG to the screen returned nothing. However, doing this seemed to work a little better;
Code:
for ARG in `cat /proc/cmdline`; do
echo $ARG
done
produces
BOOT_IMAGE=vmlinuz
initrd=initrd.gz
label="USB"
And typing
Code:
echo $ARG | cut -f2 -d=
manually after this produces "USB". Complete with the quotes. I could put the `` after the -d= there, I get the same result.
But then there's a variable called LABEL_FOR_ROOT but this seems to be totally blank, nothing, empty. I don't profess to be a developer or anything but it almost looks like something could be failing in this piece:
Code:
# Parse command line
for ARG in `cat /proc/cmdline`; do
case $ARG in
rescue)
RESCUE=1
;;
# Added by Magnus Uppman
label=*)
LABEL_FOR_ROOT=`echo $ARG | cut -f2 -d=`
;;
uuid=*)
UUID_FOR_ROOT=`echo $ARG | cut -f2 -d=`
;;
install)
RESCUE=2
;;
#
root=/dev/*)
ROOTDEV=`echo $ARG | cut -f2 -d=`
;;
rootfs=*)
ROOTFS=`echo $ARG | cut -f2 -d=`
;;
luksdev=/dev/*)
LUKSDEV=`echo $ARG | cut -f2 -d=`
;;
waitforroot=*)
WAIT=`echo $ARG | cut -f2 -d=`
;;
root=LABEL=*)
ROOTDEV=`echo $ARG | cut -f2- -d=`
;;
resume=*)
RESUMEDEV=`echo $ARG | cut -f2 -d=`
;;
0|1|2|3|4|5|6)
RUNLEVEL=$ARG
;;
esac
done
Code:
echo $LABEL_FOR_ROOT ==>
I am not 100% sure how that works but it dosen't seem to set LABEL_FOR_ROOT at all. Not sure why though!
ljones