Tiny Core Linux

General TC => Remasters / Remixes - Unofficial => Topic started by: MJZ on December 19, 2011, 07:30:16 PM

Title: After remastering (manual/automated) TCL does not boot...
Post by: MJZ on December 19, 2011, 07:30:16 PM
...though it does boot in VirtualBox4.0.12  ???


First, as I am new to the forum, let me say, you engineered a great piece of software!
It was already very useful to me, and I will use it further.   :)


Now I have a kind of weird problem (already put 10 working hours in solving it...):
After remastering (manually and with ezremaster resp. remaster.sh), when loaded with (different) bootloaders, the screen goes blank and the system freezes. It is hard to determine the exact point of time, but I guess, it is either during loading the gziped ramdisk to ram, or shortly afterwards. The Kernel doesn't give any (visible) output yet.
The vmlinuz is ok, booting it without a ramdisk is ok (besides missing fs).

The weirdest thing: to provide a test case, I remastered TCL (microcore and tinycore!), without applying any changes to it. So I basically just unpacked und re-packed them. Same Problem each time!

And: remasterd TCL does run on VirtualBox! Tests on other machines are pending...

As I said, I tinkered with it for 10h.... Thank you for any help you can provide.
Cheers
Michael



ps: my machine is quite standard, amd phenom x4 II 955, asus M4N68T-M LE board, 4GB DDR3 ram, nVidia GT 430.....
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: maro on December 19, 2011, 08:24:54 PM
First up to see how far the kernel gets in it's boot process I'd suggest to avoid boot code 'quiet' (or rather use 'debug' instead). This way you should at least get some output from the kernel which should guide your next steps. If you don't get anything from the kernel then it's obviously the boot loader that needs looking into.
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: MJZ on December 19, 2011, 09:09:46 PM
thank you.
I tried that, there is no output (or at least none I can perceive before the screen turns dark).
Weird thing about the bootloaders: they had no problem loading the original ramdisk; and they have no problem in virtualbox. Are there any such problems known, especially syslinux/isolinux?
i will try some more loaders and report back...
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: coreplayer2 on December 19, 2011, 09:53:20 PM
Not sure if this is related but, I have reported similar sounding issue with early versions of syslinux version 4.   Prior releases ie 3.86 (I think and earlier) did not have this problem.   In my experience this occurred only on older equipment, where black screen appeared early during syslinux boot process.

try an earlier syslinux version or grub4dos (both of which boots fine on older equipment not supported by syslinux v4).

Like I say not sure if this is same issue but it sure sounds similar.
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: MJZ on December 20, 2011, 07:52:35 AM
as the same problem occurs with isolinux/syslinux, and grub-legacy and grub2, I'm not sure that it is a boot loader specific problem.
With grub2, I got now a slightly different result: after loading the two TCL files, the kernel boots but panics.
See attached output.
Any ideas? Thank you again.
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: MJZ on December 20, 2011, 09:14:37 AM
one more hint:
the only thing I changed to it (for test reasons), is the following unpack/pack-cycle done under my awesome running TCL4.1, as suggested in the wiki.

Code: (bash) [Select]
# unpack it
zcat /tmp/tinycore.gz | sudo cpio -i -H newc -d
# pack it
sudo find | sudo cpio -o -H newc | gzip -2 > ../tinycore.gz
advdef -z4 tinycore.gz

Afterwards, neither a burned iso, nor the manual hd installation will boot.

And same result, when I do a "ez-remaster", without changing anything (so I only tell ezremaster the location of a original .iso and let the rest unchanged...  ???
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: curaga on December 20, 2011, 10:11:01 AM
Well this is quite curious. Does your extract dir have correct permissions and owner (root:root 755), does the fs it is on have enough free space?

If you then extract your repacked initrd to a different dir, are there differences? (diff -Nur olddir newdir | grep -v special)
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: MJZ on December 20, 2011, 11:57:36 AM
nope, I checked it right now: that's all ok

the diff outputs (beside the block-device lines) only this
diff: original/var/spool/lpd/lp: No such file or directory
diff: remaster/var/spool/lpd/lp: No such file or directory

i guess that's more or less irrelvant...

very odd...
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: genec on December 20, 2011, 06:24:22 PM
If you're comfortable making your own ISOs, I have a few suggestions:

1a) Add linux.c32 and meminfo.c32 (located in /usr/local/share/syslinux/ in the syslinux.tcz).
1b) Add some LABEL statements.  If you were using:
Code: [Select]
LABEL tc 
        KERNEL /boot/vmlinuz
        APPEND initrd=/boot/tinycore.gz quiet
add:
Code: [Select]
LABEL tcl
        COM32 /boot/linux.c32
        APPEND /boot/vmlinuz initrd=/boot/tinycore.gz
and add:
Code: [Select]
LABEL mem
        COM32 /boot/meminfo.c32

2) Could you try booting using the 'tcl' LABEL?

3) Could you post the results of meminfo?  (screenshot is as you did before is enough)

4) If the 'tcl' label doesn't work, could you try Syslinux-4.05 or Syslinux-4.06-pre1 ?
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: maro on December 20, 2011, 07:44:29 PM
To get a better idea of what happens before the kernel panics you could use a boot code like 'vga=ask' which would allow you to see a list of other available screen resolutions (after pressing 'ENTER') and then choose one that provides for more lines (e.g. '80x60').

This way you might be able to gain some more insight about where the issue starts.
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: ixbrian on December 20, 2011, 10:59:29 PM
Hi MJZ,
Which unmodified version of Tiny Core successfully boots up on the system?   Is it this same version of Tiny Core that you are attempting to unpack/pack again?    Have you been able to try the remastered CD on more than 1 computer?   

It might help if you record what is happening while you are manually remastering with the "script" command and then attach that here so we can review it.   Just type "script" and then everything in that terminal will be logged to a file named "typescript" until you type "exit" which ends the recording. 
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: MJZ on December 21, 2011, 09:38:19 AM
hi everone! thanks for all the advices.

ok, what has happend so far:




Thank you again very much for your support so far. Getting back to find a solution....  :-\



Code: (bash) [Select]
tc@box:/mnt/sda3/testremaster$ remaster.sh /mnt/sda3/testremaster/ezremaster.cfg
 rebuild
+ alias grep=busybox grep
+ alias sed=busybox sed
+ alias awk=busybox awk
+ alias wget=busybox wget
+ cd_type=
+ [ 2 -ne 2 ]
+ input=/mnt/sda3/testremaster/ezremaster.cfg
+ [ ! -r /mnt/sda3/testremaster/ezremaster.cfg ]
+ function=rebuild
+ busybox grep ^cd_location =  /mnt/sda3/testremaster/ezremaster.cfg+
busybox awk {print $3}
+ cd_location=/mnt/sda3/master/Core-4.2rc2.iso
+ busybox grep ^temp_dir = +  /mnt/sda3/testremaster/ezremaster.cfg
busybox awk {print $3}
+ temp_dir=/mnt/sda3/testremaster
+ mkdir -p /mnt/sda3/testremaster/image
+ mkdir -p /mnt/sda3/testremaster/extract
+ mkdir -p /mnt/sda3/testremaster/mnt
+ mkdir -p /mnt/sda3/testremaster/app_dep
+ [ ! -d /mnt/sda3/testremaster/image ]
+ extractimage
+ checkmountimage
+ echo cd location:  /mnt/sda3/master/Core-4.2rc2.iso
cd location:  /mnt/sda3/master/Core-4.2rc2.iso
+ [ -f /mnt/sda3/master/Core-4.2rc2.iso/boot/core.gz ]
+ [ -f /mnt/sda3/master/Core-4.2rc2.iso ]
+ sudo mount /mnt/sda3/master/Core-4.2rc2.iso /mnt/sda3/testremaster/mnt
+ [ -f /mnt/sda3/testremaster/mnt/boot/core.gz ]
+ cd_type=iso
+ [ ! -n iso ]
+ sudo rm -rf /mnt/sda3/testremaster/extract
+ sudo rm -rf /mnt/sda3/testremaster/image
+ sudo rm -rf /mnt/sda3/testremaster/extract_apps
+ sudo rm -rf /mnt/sda3/testremaster/app_dep
+ mkdir -p /mnt/sda3/testremaster/app_dep
+ mkdir -p /mnt/sda3/testremaster/extract_apps
+ mkdir -p /mnt/sda3/testremaster/extract
+ mkdir -p /mnt/sda3/testremaster/image
+ [ iso == iso ]
+ sudo cp -a /mnt/sda3/testremaster/mnt/boot /mnt/sda3/testremaster/image
+ sudo umount /mnt/sda3/testremaster/mnt
+ cd /mnt/sda3/testremaster/extract
+ zcat /mnt/sda3/testremaster/image/boot/core.gz
+ sudo cpio -i -H newc -d
+ bootcode
+ [ ! -f /mnt/sda3/testremaster/image/boot/isolinux/isolinux.cfg ]
+ sudo busybox sed -i s/APPEND/append/ /mnt/sda3/testremaster/image/boot/isolinux/isolinux.cfg
+ cat /mnt/sda3/testremaster/ezremaster.cfg
+ + busybox awkbusybox { $1=""; $2=""; print }
 grep ^cc =
+ busybox grep ^app_outside_initrd /mnt/sda3/testremaster/ezremaster.cfg
+ [ -n  ]
+ apps
+ . /etc/init.d/tc-functions
+ [ -f /proc/cmdline ]
+ CMDLINE=
+ cat /proc/cmdline
+ CMDLINE= initrd=/boot/core.gz quiet kmaps=qwertz/de vga=795 tce=UUID="5d628a3f-8f5f-4703-aade-211e80b0df95" BOOT_IMAGE=/boot/vmlinuz
+ echo -e \r\033[K
+ CRE=
+ echo -e \033[1;31m
+ RED=
+ echo -e \033[1;32m
+ GREEN=
+ echo -e \033[1;33m
+ YELLOW=
+ echo -e \033[1;34m
+ BLUE=
+ echo -e \033[1;35m
+ MAGENTA=
+ echo -e \033[1;36m
+ CYAN=
+ echo -e \033[1;37m
+ WHITE=
+ echo -e \033[0;39m
+ NORMAL=
+ getMirror
+ read MIRROR
+ getMajorVer
+ busybox awk {printf "%d", $1} /usr/share/doc/tc/release.txt
+ MIRROR=http://distro.ibiblio.org/tinycorelinux/4.x/x86/tcz
+ uname -r
+ kernel=3.0.3-tinycore
+ cat /mnt/sda3/testremaster/ezremaster.cfg
+ busybox+  grepbusybox awk ^app_outside_initrd_onboot =  {print $3}

+ cat /mnt/sda3/testremaster/ezremaster.cfg
+ + busyboxbusybox grep awk {print $3}
 ^app_outside_initrd =
+ cat /mnt/sda3/testremaster/ezremaster.cfg
+ busybox grep ^app_inside_initrd_onboot =
+ busybox awk {print $3}
+ cat /mnt/sda3/testremaster/ezremaster.cfg
+ busybox grep ^app_inside_initrd =
+ busybox awk {print $3}
+ cat /mnt/sda3/testremaster/ezremaster.cfg
+ busybox grep ^app_extract_initrd =
+ busybox awk {print $3}
+ busybox grep+  ^mydata =  /mnt/sda3/testremaster/ezremaster.cfg
busybox awk {print $3}
+ mydata=
+ [ -n  ]
+ package
+ uname -r
+ sudo depmod -a -b /mnt/sda3/testremaster/extract 3.0.3-tinycore
+ sudo ldconfig -r /mnt/sda3/testremaster/extract
+ cd /mnt/sda3/testremaster/extract
+ umount /mnt/sda3/testremaster/extract/proc
+ sudo sh -c find . | cpio -o -H newc | gzip -2 > /mnt/sda3/testremaster/image/boot/core.gz
+ sudo advdef -z4 /mnt/sda3/testremaster/image/boot/core.gz
     5553544     5491881  98% /mnt/sda3/testremaster/image/boot/core.gz
     5553544     5491881  98%
+ cdlabel=Tinycore
+ cd /mnt/sda3/testremaster/image
+ cat boot/isolinux/isolinux.cfg
display boot.msg
default microcore
label microcore
kernel /boot/vmlinuz
append initrd=/boot/core.gz quiet

label mc
kernel /boot/vmlinuz
append initrd=/boot/core.gz quiet
implicit 0
prompt 1
timeout 300
F1 boot.msg
F2 f2
F3 f3
F4 f4
+ sudo mkisofs -l -J -R -V Tinycore -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o /mnt/sda3/testremaster/ezremaster.iso .
Size of boot image is 4 sectors -> No emulation
Total translation table size: 2048
Total rockridge attributes bytes: 1437
Total directory bytes: 4096
Path table size(bytes): 38
Max brk space used 22000
4108 extents written (8 MB)
tc@box:/mnt/sda3/testremaster$ exit


[attachment deleted by admin]
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: MJZ on December 21, 2011, 10:11:08 AM
more curious things:

I just did a remastered Core-4.2-rc2, but this time, I did it under a live system running in my VirtualBox under Ubuntu. When I burned the iso and rebooted my pc with the new cd, all was fine!


Maybe I could go on with that solution temporarily for prototyping, but actually I need to use my native TCL system on hdd for real work...
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: curaga on December 21, 2011, 02:05:13 PM
This is starting to look like something with your hw, I'm afraid.
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: genec on December 21, 2011, 02:41:29 PM
  • @genec: I did what you suggested, but
    - #1a and #1b did fail with syslinux:"no kernel image {linux.c32|meminfo.c32} found"
    - I did instead a memtest wich came with my Ubuntu system. It reported no errors. You want to see the screen output?
    - for #4 I had no time for Syslinux-4.05 or Syslinux-4.06-pre1 yet.

For #1a, you needed to place them in the /boot/ directory (I left that part out but thought it might have been implied).  Memtest's output is useless.  You might have a memory hole that's breaking things.  meminfo.c32 will tell me where and linux.c32 should be able to work around it.
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: MJZ on December 21, 2011, 05:38:20 PM
@genec
yes, they were placed at /boot/
and no, memory is fine (and I guess it would affect untouched ramdisks as well, though maybe in other locations).

@curaga
it seems so. well some interdependencies between hw and... some routine?
I am out of ideas now...
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: genec on December 21, 2011, 10:43:21 PM
@genec
yes, they were placed at /boot/
and no, memory is fine (and I guess it would affect untouched ramdisks as well, though maybe in other locations).

Also, you want to try calling the labels not just typing the binary's name.  So, at the "boot:" prompt, type 'mem' or 'tcl' (without the quotes, of course).  This is why I suggested adding LABEL directive statements to the config file.

A memory hole is a range of memory that's reserved and for this purpose can't be used for loading the kernel/initrd.  I've got a system that can't load a kernel/initrd payload of more than ~25 MiB without linux.c32 even though the machine has 2 GiB of RAM.  It has nothing to do with memory faults.

What are the sizes of the initrds that did and did not work?

Has the failing system always worked in VirtualBox?  Tried doing just a gzip level 4 or 9 rather than advdef?
Title: Re: After remastering (manual/automated) TCL does not boot...
Post by: MJZ on December 22, 2011, 08:16:56 AM
Quote
This is why I suggested adding LABEL directive statements to the config file.
actually I did so, have to check if I did maybe a mistake

thanks for the explanation of memory hole!
I am aware of this size restrictions, but there are no problems with loading a 60M ramdisk I made under VirtualBox, but with a 8MB ramdisk made natively running tcl....

yes, it always works booting them in vb, and also any system remastered under tcl in vb boots perfectly on bare metal.
I tried it with gzip -2 and without any advdef - same result.