LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Cannot boot slackware13, even with the slackware13 created flashdrive (https://www.linuxquestions.org/questions/slackware-14/cannot-boot-slackware13-even-with-the-slackware13-created-flashdrive-772192/)

uppman 02-14-2010 02:06 AM

Quote:

Originally Posted by ljones0 (Post 3862723)
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!).

It would look almost the same in syslinux.

As boot params:
vmlinuz root=/dev/sdb6 rootdelay=10

In syslinux.cfg:
kernel vmlinuz
append root=/dev/sdb6 rootdelay=10

Quote:


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"


ARG is just a temporary variable in a for loop..

Quote:

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!
The variable LABEL_FOR_ROOT is local to the script and its value doesn't show in the shell.

Can you please show the output of cat /proc/partitions and /sbin/blkid?

/Magnus

ljones0 02-14-2010 07:06 AM

2 Attachment(s)
Ok here's the output of cat /proc/partitions & /sbin/blkid. Had to put them here as pictures as there's a lot to type out (running the risk of typos!). I hope they show up ok!

ljones

uppman 02-14-2010 10:27 AM

Quote:

Originally Posted by ljones0 (Post 3863274)
Ok here's the output of cat /proc/partitions & /sbin/blkid. Had to put them here as pictures as there's a lot to type out (running the risk of typos!). I hope they show up ok!

ljones

Everything looks ok. I really don't know what is wrong..

Perhaps you could try with the prebuilt initrd on the wiki?

/Magnus

ljones0 02-14-2010 04:01 PM

I tried that but it did a very similar thing, it crashed out. Also the keyboard mappings seemed to be all over the place x.x.

I wonder if there's a way of hard coding that LABEL_FOR_ROOT variable? Maybe just to test it?

Edit

In the init script there are lots of lines,such as

Code:

LABEL_FOR_ROOT=`echo $ARG | cut -f2 -d=`
UUID_FOR_ROOT=`echo $ARG | cut -f2 -d=`
etc..

I tried the following. After each one of those commands I put something like this in the script....

echo "LABEL_FOR_ROOT=" $LABEL_FOR_ROOT >> dump1
echo "UUID_FOR_ROOT=" $UUID_FOR_ROOT >> dump1

for example becomes .....

Code:

..
..
# Added by Magnus Uppman 
    label=*)
      LABEL_FOR_ROOT=`echo $ARG | cut -f2 -d=`
      echo "LABEL_FOR_ROOT=" $LABEL_FOR_ROOT >> dump1
    ;;
    uuid=*)       
      UUID_FOR_ROOT=`echo $ARG | cut -f2 -d=`
      echo "UUID_FOR_ROOT=" $UUID_FOR_ROOT >> dump1
    ;;
    install)       
      RESCUE=2
    ;;
#
..
..

after each one (I did this for all those lines not just those 2 so that the contents of those variables end up in just one file, dump1). I tried this out and got this:

Code:

LABEL_FOR_ROOT="USB"
RESCUE=
ARG= label="USB"

But no sign of ROOTDEV - ! (I did put an ECHO command in for ROOTDEV!).

Which I guess sounds right because ....

Code:

if [ "$ROOTDEV" = "" ]
 then
  echo "Didn't find the root partition! Try again or exit to a shell?"
  echo -n "(yes,Shell)->"

Thats the message I get, so ROOTDEV is empty for some weird reason!

ljones

uppman 02-15-2010 11:14 AM

Quote:

Originally Posted by ljones0 (Post 3863636)
Code:

if [ "$ROOTDEV" = "" ]
 then
  echo "Didn't find the root partition! Try again or exit to a shell?"
  echo -n "(yes,Shell)->"

Thats the message I get, so ROOTDEV is empty for some weird reason!

ljones

Have you tried "Try again?"? :)

Sometimes it takes a while for a USB-disk to get recognized by the kernel.

Otherwise I don't have a clue..You seem to have a correct value for LABEL_FOR_ROOT so no need to harcode it.

/Magnus

ljones0 02-15-2010 12:31 PM

Quote:

Originally Posted by uppman (Post 3864546)
Have you tried "Try again?"? :)

Sometimes it takes a while for a USB-disk to get recognized by the kernel.

Otherwise I don't have a clue..You seem to have a correct value for LABEL_FOR_ROOT so no need to harcode it.

/Magnus

I must say I didn't try that! I rebooted but it didn't give me a chance to reply to it ('try again'), it just sailed on through and dumped me back at a command line. So I had an alternative idea -- bump up the 10 second wait timer to 30 seconds and see what happens....

There's good news and bad news.

The good news is that it works :) !

The bad news is that I think I must possibly have the slowest USB controller in the universe - (and this is a pretty new system)!

:)

ljones

uppman 02-15-2010 01:36 PM

Quote:

Originally Posted by ljones0 (Post 3864629)
I must say I didn't try that! I rebooted but it didn't give me a chance to reply to it ('try again'), it just sailed on through and dumped me back at a command line. So I had an alternative idea -- bump up the 10 second wait timer to 30 seconds and see what happens....

There's good news and bad news.

The good news is that it works :) !

The bad news is that I think I must possibly have the slowest USB controller in the universe - (and this is a pretty new system)!

:)

ljones

Good to hear! :)

I doubt the controller is slow, more likely the USB-stick..
You can improve the speed by mounting ramdisks over /tmp and /var/tmp in /etc/fstab:

Code:

# Speed up things a bit, use primarly for systems on USB-flash
tmpfs          /tmp    tmpfs  mode=1777      0      0
tmpfs          /var/tmp        tmpfs  mode=1777      0      0

/Magnus

ljones0 02-19-2010 01:51 PM

I must give this another go :) . Though right now someone's given me their cold or flu ..... ugh x.x !

ljones

ljones0 02-28-2010 03:07 PM

Ok .... here's a very rough interim list of what I did;

Done with a normal PC and a test PC.

Slackware 13 32-bit.

USB Memory card

Hard disk

Test install

1. Boot slackware from DVD as normal

2. Make 2 partitions on the hard drive. (ext3) /dev/hda1 / dev/hda2

3. Do a completely normal install to hard drive. To test just install A
packages. Include lilo.

4. Reboot and check it works ok.

5. install a text editor
mkdir /tmp/0
mount /dev/dvd /tmp/0
cd /tmp/0/slackware/ap
installpkg jed*

6. Edit /etc/fstab
jed /etc/fstab
Change /dev/hda1 to /dev/root

7. Save, reboot and check if it all still boots ok.

8. Format second partition with mkfs.ext3 /dev/hda2

9. Mount /dev/hda2 as /tmp/0 -----> mount /dev/hda2 /tmp/0

10. Back up with this:
cd /
tar cvpzf /tmp/0/backup.tgz --exclude=/proc --exclude=/tmp/0/backup.tgz --exclude=/sys --exclude=/tmp /

11. umount /tmp/0

12 Do this:

cd /boot
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 ..

mount /dev/dvd /mnt/dvd
installpkg -root /boot/initrd-tree /mnt/dvd/slackware/a/devs-2.3.1-noarch-25.*


Change delay from 10 to 30 seconds in init_13.0.txt --

..
..
echo "Waiting 10s for USB devices to settle down...."
sleep 10 <---- change to 30

Copy init_13.0.txt to somewhere on the hard drive
cp /root/init_13.0.txt /boot/initrd-tree/init


mkinitrd


13. Grab a USB stick or SD card and partition it

sda1 BOOT Primary Fat32 50MB
sda2 Primary Linux 800MB

Format and name the sda2 partition as "USB" with e2label.

14. Mount sda1 onto /tmp/0 ; mount /dev/sda1 /tmp/0

15. mkdir /tmp/0/syslinux

16. cp /boot/vmlinuz /tmp/0/syslinux

17. cp /boot/initrd.gz /tmp/0/syslinux

18. jed /tmp/0/syslinux/syslinux.cfg
----> default vmlinuz initrd=initrd.gz label="USB"

19. syslinux -s /dev/sda1

20. umount /tmp/0

21.mount sda2 on /tmp/0 ----> mount /dev/sda2 /tmp/0

22. Mount second hard drive partition on /tmp/1 ----> mkdir /tmp/1

23. mount /dev/hda2 /tmp/1

24. Decompress the tar.gz file made earlier;
tar xvpfz backup.tgz -C /tmp/0/

25. cd /tmp/0 and make the missing dirs --
mkdir proc
mkdir sys
mkdir tmp

26. umount /tmp/0,1

if they don't exist on /dev/sda2 mkdir /proc mkdir /sys mkdir /tmp

Boot off USB and try it !

ljones

ljones0 02-13-2011 06:40 PM

Just been trying this for slackware 13.1 and unfortunatly these instructions no longer work with 13.1 though I cannot tell why. All I get is .....

Code:

Kernel panic - no syncing : Attempted to kill init!
Pid: 1, comm : init Not tainted 2.6.33.4-smp #2
Call Trace:

ljones


All times are GMT -5. The time now is 08:30 PM.