WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Install TC host grub2 iso file no optical drive plus SOLUTION  (Read 1893 times)

aus9

  • Guest
Install TC host grub2 iso file no optical drive plus SOLUTION
« on: September 21, 2012, 05:29:58 AM »
Hi

EDIT

See post 3 pls, this method is now obsolete, replaced by wiki entry

I have an optical drive but thought I would test my puny skills using grub2 "isofrom" and other such tricks.  I could not find a recent grub2 wiki/forum post that successfully boots TC so here is how I did it.

Leaping ahead, I could not get bootcode "cde" or live=cde to land

My assumptions include:  you have root powers at your host Linux distro that uses grub2
---you have wired internet
---your optical drive is missing or not working.
---you know other options for persistence as per wiki or IRC or forum.
---There is some trivia below to show what I tried to get the loopback working


1) Use root powers to create an /etc/grub.d/40_custom entry that looks like this
---you can add other boot codes

Quote
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "TC hard-drive" {
insmod loopback
set isofile=/boot/tc/tc.iso
loopback loop (hd0,msdos1)$isofile
linux (loop)/boot/vmlinuz tce=sda2 opt=sda2 waitusb=5 showapps
initrd (loop)/boot/core.gz
}

menuentry "TC first-run" {
insmod loopback
set isofile=/boot/tc/tc.iso
loopback loop (hd0,msdos1)$isofile
linux (loop)/boot/vmlinuz waitusb=5 cde tce=sda2 opt=sda2
initrd (loop)/boot/core.gz
}


NOTE there is one blank line at end of file in above quote.

Create a script I called my "load-script" with contents ....done as non-root
Quote
#!/bin/sh
tce-load -wi Xlibs
tce-load -wi Xprogs
tce-load -wi Xvesa
tce-load -wi fltk-1.10
tce-load -wi wbar
tce-load -wi flwm_topside

run
Code: [Select]
chmod 666 load-script

Above is my work-a-round as I could not get cde to load.

2) Use web browser or wget command to download the TinyCore-current.iso
Use root powers to create a new folder structure at your /boot so its called
/boot/tc
move and rename the iso into that folder and call it tc.iso so it matches our grub entry then run
Code: [Select]
update-grub
cat /boot/grub/grub.cfg
(to check new entry landed)
reboot

3) Obviously change your partitions and file names to suit your distro. I elected to have tce and opt on my partition.
(hd0,msdos1)$isofile is an absolute pathway and has no gaps (spaces)

4) On reboot, choose the first-run menuentry
it boots to console.
Stay as tc user, open terminal and
Code: [Select]
cd /mnt/sda2
sh load-script
sudo reboot

5) On reboot, now choose "hard-drive" entry
If you are lucky, TC now boots correctly

« Last Edit: September 21, 2012, 09:01:31 PM by aus9 »

aus9

  • Guest
TRIVIA

There are a number of wikis including arch but I failed to get them to work for me, at the moment

Here are some tests I did that may help you understand what/why I used the above format

boot menu apppears...grub2....press c for command mode

set pager=1 (from arch wiki)

--> this allows scroll pages

lsmod

---> my menu already had loaded modules for my partition and msdos style MBR

insmod loopback

Now following that I did the menuentry commands line by line, but you can use the TAB key to auto-complete

---Initially I did not set up my loopback correctly, there are conflicting guides on the net

so when I typed   b....and pressed the TAB key, it output.....bin and boot proving the loopback failed.

When loopback is correctly setup, IMHO, typing b and pressing TAB ...grub2 is looking into iso, so finds only boot/ and cde/ so will auto-complete boot

NOTE WELL, after typing all those commands you also need to press enter at end of each line and then enter "boot" without the quotes and press enter for action to begin.

good luck

aus9

  • Guest
I wasn't entirely happy that I needed a work-a-round so I built a working method using unpack and copy of various files.
No isofrom stuff used....its more a "traditional" build.

Reboot proves method works so its in the wiki.

http://wiki.tinycorelinux.net/wiki:install_wo_optical_grub2