WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: HOW2 boot ALSO 32bit installation from same TC64bootStik?  (Read 242 times)

Offline labeas

  • Full Member
  • ***
  • Posts: 134
HOW2 boot ALSO 32bit installation from same TC64bootStik?
« on: September 29, 2017, 02:51:54 AM »
I've read, April 11, 2017 & December 23, 2015 versions of:
  How to make a legacy bios/uefi dual boot usb stick with syslinux
I badly need to boot a 32bit app, on a USB to SATA device;
  and I'd like to be able to modify & use my existing TC64bootStik,
  which currently looks like:
      /EFI/BOOT/
       efiboot.imggrub/
         fonts/   grub.cfg  grub.cfgOrgnl
---       
      /boot
         AnalySyslinuxSlaKrnlisolinux/
corepure64.gzvmlinuz64
     corepure64v8.gzvmlinuz64v8
---     
        HowNoX  f3  isolinux.cfgFeb17
            boot.cat f4 isolinux.cfgMay17
            boot.msg  isolinux.bin isolinux.cfgOrgnl
            f1 isolinux.cfg  isolnxCfg17Jun
            f2 isolinux.cfgApr17 menu.c32
--Oh Shit, my Tabs may differ from yours. I must make `tab2space` ?
AFAIK TC64 boots from syslinux, NOT grub, and the lost USBstik that
previously booted the 32bit,486Kerneled App looked like:---
   default kz initrd=initrd.gz root=/dev/hda15 vga=normal ro
---
  #cp $T_PX/usr/share/syslinux/isolinux.bin $TMP/bootdisk/
  cat << EOF > $TMP/bootdisk/message.txt
 
Welcome to the .09Slackware.07 Linux custom USB boot stick!
     
By default, this stick boots a root Linux partition on $ROOT_DEVICE when you
hit ENTER.  If you'd like to boot some other partition, use a command like
this on the prompt below:
 
    mount root=/dev/sda1 ro
 
Where "/dev/sda1" is the partition you want to boot, and "ro" specifies that
---
 $TMP/bootdisk/syslinux.cfg ==
default vmlinuz root=$ROOT_DEVICE vga=normal ro
prompt 1
timeout 6000
display message.txt
F1 f1.txt
F2 message.txt
label mount
  kernel vmlinuz
  append root=$ROOT_DEVICE vga=normal ro
--- That's part of the Slackware that created the now lost USBstik.
A problem could be, not knowing the /dev/xxx of the USBtoSATA device?

Please advise.

Offline polikuo

  • Full Member
  • ***
  • Posts: 245
Re: HOW2 boot ALSO 32bit installation from same TC64bootStik?
« Reply #1 on: September 29, 2017, 05:48:09 AM »
If you're booting with UEFI, you'll probably need to use 64-bit kernel + 64-bit modules + 32-bit rootfs
See http://tinycorelinux.net/8.x/x86/release/distribution_files/
Download vmlinuz64 + modules64.gz + rootfs.gz

In your syslinux.cfg
Code: [Select]
label tinycore
  kernel vmlinuz64
  initrd modules64.gz,rootfs.gz # use comma ","
  append ...

P.S.
If you just post the output of "ls -R", it'll be much easier for the others to understand the contents in your USB.  :)
P.P.S
I think "ro" stands for "read-only".

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 2532
Re: HOW2 boot ALSO 32bit installation from same TC64bootStik?
« Reply #2 on: September 29, 2017, 08:55:57 PM »
You can also use Grub2, see http://forum.tinycorelinux.net/index.php/topic,19364.msg119228.html#msg119228

Either bootloader works I believe.  I've been multi booting various 32/64 bit TC versions off a USB, HDD and SSD for years now.  The only critical thing to remember is, each system you boot too must have a dedicated tce directory specified in the boot config file as corepure64 and 32bit extensions shouldn't be mixed.  Again for clarity, core64 and tinycore32bit extensions can be mixed, however corepure64 and tinycore32bit can not be mixed.

 

Offline labeas

  • Full Member
  • ***
  • Posts: 134
Re: HOW2 boot ALSO 32bit installation from same TC64bootStik?
« Reply #3 on: October 16, 2017, 05:52:32 PM »
OK: I didn't want to deviate from TC too much,
but extending a system that's already working,
is often better that starting new.
Many systems, including TC, hope to satisfy all users' wants.
An important facility for me, is instead of the current fad
of being blasted with <www.html> pictures, to get just the
relevant TEXT to *.mp3, to absorb: lying down relaxing.
----
This works with TC64:(links & wily [quick cut-off head & tail and garbage])
 followed by: chroot <existing/proven 32bit TextToWave> => *.wav to *.mp3
So I do a lot of TC64: <chroot old/proven apps>.
----
Apart from my <apparently syslinux> TC64 bootStik, 2 other GRUB bootStiks
fail to boot an important USB-SATA 32bit partition. The nearest is the
well-known <failed to load root block (0,0)> message.
Perhaps it needs a <wait>, for the slow USB-SATA,
but I can't see if/how GRUB can do that.
Since my TC64 bootStik has got <wait for slow device facilities>, I'm
hoping it can be setup to boot this important 32bit USB-SATA partition.

== Thanks.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 2532
Re: HOW2 boot ALSO 32bit installation from same TC64bootStik?
« Reply #4 on: October 17, 2017, 01:13:49 AM »
Anything is possible, it just requires a little effort..

After a correct boot loader / manager install regardless of whether syslinux or Grub2 is used, the key to successfully booting is a Boot config file which correctly displays the drives directory structure with path to the kernel, kernel modules and TC rootfs and tce directory.  follow the example below which is a partial and highly modified excerpt from one of my multi boot installs.

Quote
Perhaps it needs a <wait>, for the slow USB-SATA,
but I can't see if/how GRUB can do that.
Perhaps check an example "waitusb" bootcode from one of my Grub2 boot config files below???  you use the same method whichever boot loader/manager you use
If you can boot the drive using syslinux, then use that. 

Drive directory structure:  note that "tc8-x86_64" is a tce directory, which you can define in the config file.  Also note; a drive which can plugged into a Windows PC gets a FAT boot partition then an ext2/4 partition for all Linux system, Home, OPT and TCE directories  so Windows won't interfere..
Code: [Select]
/mnt/sda2 $ version
8.2
/mnt/sda2 $ uname -r
4.8.17-tinycore64

/mnt/sda1 $ tree -L 3
.
|-- boot
    -- grub
        |-- grub.cfg
        |-- grub.cfg.bak
        |-- grubenv
        |-- i386-pc
        |-- locale
/mnt/sda2 $ tree -L 2
.
|-- home
|   -- tc
|-- linux
|   |-- grub_backup
|   |-- modules-429.gz
|   |-- modules-4817.gz
|   |-- modules64-429.gz
|   |-- modules64-4817.gz
|   |-- rootfs-72.gz
|   |-- rootfs-82.gz
|   |-- rootfs64-72.gz
|   |-- rootfs64-82.gz
|   |-- vmlinuz-429
|   |-- vmlinuz-4817
|   |-- vmlinuz64-429
|   |-- vmlinuz64-4817
|-- opt
|-- tc7-x86
|   |-- mydata.tgz
|   |-- mydata_tc7x86.Vesa.tgz
|   |-- mydata_tc7x86.Xorg.tgz
|   |-- onboot.lst
|   |-- onboot_Core64.lst
|   |-- onboot_x86_Xorg.lst
|   |-- onboot_x86_Xvesa.lst
|   |-- ondemand
|   |-- optional
|-- tc7-x86_64
|   |-- OnbootPure64Def.lst
|   |-- mydataCorePure64.tgz
|   |-- onboot.lst
|   |-- onboot_CorePure64.lst
|   |-- ondemand
|   |-- optional
|-- tc8-x86
|   |-- defonboot.lst
|   |-- mydata_tc7x86.Vesa.tgz
|   |-- mydata_tc7x86.Xorg.tgz
|   |-- mydata_tc8x86.Vesa.tgz
|   |-- onboot.lst
|   |-- onboot_Core64.lst
|   |-- onboot_x86_Xorg.lst
|   |-- onboot_x86_Xvesa.lst
|   |-- ondemand
|   |-- optional
`-- tc8-x86_64
    |-- OnbootPure64Def.lst
    |-- mydataCorePure64.tgz
    |-- onboot_CorePure64.lst
    |-- ondemand
    |-- optional


Create a boot config file whether syslinux or Grub2 like this grub example
Code: [Select]
insmod part_msdos
insmod fat
insmod ext2
loadfont unicode
set gfxterm=auto
terminal_output gfxterm
GRUB_GFXMODE=1900X1200X16
GRUB_GFXPAYLOAD_LINUX=keep

#Timeout for menu
set default=8
set timeout=5

menuentry "*** TC-7-x86 (Xvesa on SSD)" {
search --no-floppy --fs-uuid --set=root 196fcfb2-bd37-495d-b855-41f08201be7d
linux /linux/vmlinuz-429 noswap tz=GMT loglevel=3 waitusb=5:UUID="196fcfb2-bd37-495d-b855-41f08201be7d" tce=UUID="196fcfb2-bd37-495d-b855-41f08201be7d"/tc7-x86 opt=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" home=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" lst=onboot_x86_Xvesa.lst mydata=mydata_tc7x86.Vesa
initrd /linux/rootfs-72.gz /linux/modules-429.gz
}

menuentry "*** TC-7-x86 (Xorg on SSD)" {
search --no-floppy --fs-uuid --set=root 196fcfb2-bd37-495d-b855-41f08201be7d
linux /linux/vmlinuz-429 vmalloc=256MB tz=GMT loglevel=3 waitusb=5:UUID="196fcfb2-bd37-495d-b855-41f08201be7d" tce=UUID="196fcfb2-bd37-495d-b855-41f08201be7d"/tc7-x86 opt=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" home=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" lst=onboot_x86_Xorg.lst mydata=mydata_tc7x86.Xorg
initrd /linux/rootfs-72.gz /linux/modules-429.gz
}

menuentry "*** TC-7-Core64 (on SSD)" {
search --no-floppy --fs-uuid --set=root 196fcfb2-bd37-495d-b855-41f08201be7d
linux /linux/vmlinuz64-429 tz=GMT loglevel=3 waitusb=5:UUID="196fcfb2-bd37-495d-b855-41f08201be7d" tce=UUID="196fcfb2-bd37-495d-b855-41f08201be7d"/tc7-x86 opt=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" home=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" lst=onboot_Core64.lst
initrd /linux/rootfs-72.gz /linux/modules64-429.gz
}

menuentry "*** TC-7-Corepure64 (on SSD)" {
search --no-floppy --fs-uuid --set=root 196fcfb2-bd37-495d-b855-41f08201be7d
linux /linux/vmlinuz64-429 noswap tz=GMT loglevel=3 waitusb=5:UUID="196fcfb2-bd37-495d-b855-41f08201be7d" tce=UUID="196fcfb2-bd37-495d-b855-41f08201be7d"/tc7-x86_64 opt=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" home=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" lst=onboot_CorePure64.lst mydata=mydataCorePure64
initrd /linux/rootfs64-72.gz /linux/modules64-429.gz
}

menuentry "*** TC-8-x86 (Xvesa on SSD)" {
search --no-floppy --fs-uuid --set=root 196fcfb2-bd37-495d-b855-41f08201be7d
linux /linux/vmlinuz-4817 vmalloc=256MB tz=GMT loglevel=3 waitusb=5:UUID="196fcfb2-bd37-495d-b855-41f08201be7d" tce=UUID="196fcfb2-bd37-495d-b855-41f08201be7d"/tc8-x86 opt=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" home=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" lst=onboot_x86_Xvesa.lst mydata=mydata_tc8x86.Vesa
initrd /linux/rootfs-82.gz /linux/modules-4817.gz
}

menuentry "*** TC-8-x86 (Xorg on SSD)" {
search --no-floppy --fs-uuid --set=root 196fcfb2-bd37-495d-b855-41f08201be7d
linux /linux/vmlinuz-4817 vmalloc=256MB tz=GMT loglevel=3 waitusb=5:UUID="196fcfb2-bd37-495d-b855-41f08201be7d" tce=UUID="196fcfb2-bd37-495d-b855-41f08201be7d"/tc8-x86 opt=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" home=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" lst=onboot_x86_Xorg.lst mydata=mydata_tc7x86.Xorg
initrd /linux/rootfs-82.gz /linux/modules-4817.gz
}

menuentry "*** TC-8-Core64 (on SSD)" {
search --no-floppy --fs-uuid --set=root 196fcfb2-bd37-495d-b855-41f08201be7d
linux /linux/vmlinuz64-4817 tz=GMT loglevel=3 waitusb=5:UUID="196fcfb2-bd37-495d-b855-41f08201be7d" tce=UUID="196fcfb2-bd37-495d-b855-41f08201be7d"/tc8-x86 opt=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" home=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" lst=onboot_Core64.lst
initrd /linux/rootfs-82.gz /linux/modules64-4817.gz
}

menuentry "*** TC-8-Corepure64 (on SSD)" {
search --no-floppy --fs-uuid --set=root 196fcfb2-bd37-495d-b855-41f08201be7d
linux /linux/vmlinuz64-4817 noswap tz=GMT loglevel=3 waitusb=5:UUID="196fcfb2-bd37-495d-b855-41f08201be7d" tce=UUID="196fcfb2-bd37-495d-b855-41f08201be7d"/tc8-x86_64 opt=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" home=UUID="196fcfb2-bd37-495d-b855-41f08201be7d" lst=onboot_CorePure64.lst mydata=mydataCorePure64
initrd /linux/rootfs64-82.gz /linux/modules64-4817.gz
}

menuentry "System restart" {
echo "System rebooting..."
reboot
}

good luck..
« Last Edit: October 17, 2017, 01:44:51 AM by coreplayer2 »