Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: glene77is on June 12, 2011, 08:47:25 AM
-
*(: tcl_forum_USB_bootcode.txt
Have USB, 8G, Cruizer pendrive,
(1) with grub4dos, Puppy Linux (main OS), Parted-Magic in /pmagic, TCL in /tinycore,
(2) with second partition for data (& hopefully /tce). Formatted ext2.
Have HD system with TCL (as tinycore & tce), Puppy frugal, Ubuntu, with grub2.
(3) TCL is the only problem.
------------------------------------------------------------------------------------------------------------------------
Object is to have USB TCL load a USB /tce (ignoring any attached HD system).
------------------------------------------------------------
Problem symtoms:
(1) USB TCL (after bootup) will not recognize the USB sda1 or sda2.
(2) TCL Mount app will show sda1 & sda2 clicked 'open', but Fluff will not open sda1 or sda2.
(3) TCL Control-Panel, Backup-Restore will not recognize USB sda1 or sda2.
Any tips or hints ? :)
-
Hi glene77is
Please post the Tinycore section of your grub2 config file and I'll try to help.
-
TC does not automount USB drives.
Only the partition containing /tce will be mounted, and then only if you have the waitusb=5 ( or maybe 10 ) boot code.
-
Hi glene77is
Please post the Tinycore section of your grub2 config file and I'll try to help.
Rich,
Thanks. :)
No obligation implied, of course. ;)
USB is Booting via grub4dos, into (hd0,0) for OS, having (hd0,1) for DATA,
with Puppy Linux (main OS), Parted-Magic in /pmagic, TCL in /tinycore,
All other OS boot OK, will detect both USB partitions and access r/w as usual.
TCL OS is in /tc-core, with required mods to isolinux.cfg.
USB pendrive Boot code related to TCL:
### TinyCore : several options for testing #############################
title ---------------------------------------------------------
root (hd0,0)
### grub4dos syntax is '(hd0,0)' & 'kernal ...' & 'initrd ...'
title ---{ TinyCore root(hd0,0) pmedia=usbflash (Standard) (hda5/tce)
root (hd0,0)
kernel /tc-core/bzImage pmedia=usbflash quiet
initrd /tc-core/tinycore.gz
###
title ---{ TEST TinyCore root (hd0,0) pmedia=usbflash tce=(hd0,1)
root (hd0,0)
kernel /tc-core/bzImage pmedia=usbflash tce=(hd0,1)/tce quiet
initrd /tc-core/tinycore.gz
###
title ---{ TEST TinyCore root (hd0,0) pmedia=usbflash (Append UUID) (hd0,1)/tce
root (hd0,0)
kernel /tc-core/bzImage pmedia=usbflash quiet
# initrd /tc-core/tinycore.gz
APPEND initrd=/tc-core/tinycore.gz quiet waitusb=5:UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6" tce=UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6"/tce
### info per boot_info.sh sdb1 = "60abc2ba-477e-43af-ae8a-7affc307fa31"
### info per boot_info.sh sdb2 = "8f2b131a-3293-49c5-83b0-d443ea923eb6"
### test this
#PPEND initrd=/tc-core/tinycore.gz quiet waitusb=5:UUID="98F6-837D" tce=UUID="98F6-837D"/tc-e
#PPEND initrd=/tc-core/tinycore.gz quiet waitusb=5:UUID="60abc2ba-477e-43af-ae8a-7affc307a31" tc-e=UUID="60abc2ba-477e-43af-ae8a-7affc307a31"/tc-e
#PPEND initrd=/tc-core/tinycore.gz quiet waitusb=5:UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6" tce=UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6"/tce
######################################################
Sincew you asked, although there are no problems on the HD,
From my desk-top system , this code is from grub2 which has slightly different syntax:
menuentry "---< T-C >--- Tiny Core at (sda5,Ubuntu)/tinycore --------"
{
### grub2 syntax calls to (hd0,5)/tc-core on HardDrive. ### No problems here.
insmod ntfs
set root='(hd0,5)'
linux /tc-core/bzImage quiet
initrd /tc-core/tinycore.gz
###############################################
Problem:
(1) Booted from USB pendrive 'sda1'. Other OS run OK.
(2) Selecting TCL,
(3) Tiny-Controller , backup/restore, will not accept 'any' absolute filename "/tce" ,
and sda1 & sda2 are not mountable.
Therefore, cannot do a "Backup" to build a "/tce" .
Perhaps I misspelled 'sda' :)
I have tried 'sda' , 'sdb' , 'hd0,0' , 'hd0,1'
since grub4dos and TCL and Parted-Magic call these differently.
Appreciate any tips !
glene77is
-
Gerald Clark,
I agree.
Have had to add "wait 10" to the POST on my main computer in order to charge certain USB pendrives.
Now I see there is also boot-code that can add additional waits.
Since I am booting from a USB pendrive, it is already charged and running the grub4dos and btldr image.
But, per the suggestion, I will find a proper place to add such instruction and do it. Will not hurt.
Thanks. :)
glene77is
-
Hi glene77is
Sorry, I misread what you were trying to do so I didn't need the grub2 config.
Based on what I found in the grub4dos docs and assuming you want to boot from the first partition
with your apps on the second partition.
### TinyCore : several options for testing #############################
title ---------------------------------------------------------
root (hd0,0)
kernel /tc-core/bzImage quiet waitusb=10:UUID="60abc2ba-477e-43af-ae8a-7affc307fa31"
tce=UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6"
initrd /tc-core/tinycore.gz
Notes:
1.The "tce=UUID="8f2b.....eb6"" is part of the kernel statement and should be on the same line.
2. Your BIOS should be set to boot from USB before HD.
3. When using the mount tool you should click the button of the drive you wish to mount.
4. Unless I missed something there should be no isolinux.cfg
Hope I got it right, if not then someone familiar with grub4dos might chime in.
-
Rich,
Thanks. Will run the boot-code today.
Will place tce=UUID code as you suggest. Arrangement was on advice by someone else.
Bios always picks off any available USB bootable device, already, but ,
Will try re-arranging the sequence, as suggested.
IsoLinux.cfg is located in the TCL system subdir as:
/tc_core/isolinux/isolinux.cfg
"Mount-Tool" is used prior to running the "Control-Panel", and clicks show 'green' open,
but the "File-Manager" shows no access.
I have run "Boot_Info.sh" to look for any clues, but find nothing unusual.
Thanks for the tips :)
glene77is
-
Hi glene77is
Bios always picks off any available USB bootable device, already, but ,
Will try re-arranging the sequence, as suggested.
Also make sure you only plug in one USB storage device.
IsoLinux.cfg is located in the TCL system subdir as:
/tc_core/isolinux/isolinux.cfg
According to what I read here http://diddy.boot-land.net/grub4dos/files/intro.htm grub4dos looks for
a configuration file called menu.lst, that's where these commands belong.
"Mount-Tool" is used prior to running the "Control-Panel", and clicks show 'green' open,
but the "File-Manager" shows no access.
Just covering all the bases. Someone else once wrote that they could not access their drives even
though they all showed up (in red) when they called up the mount tool.
-
http://distro.ibiblio.org/tinycorelinux/faq.html#pendrives
Just covering all the bases. Someone else once wrote that they could not access their drives even
though they all showed up (in red) when they called up the mount tool.
Typically because of unsupported file system. Most likely NTFS. Starting with v3.7 Tiny Core, read access for NTFS is supported.
-
additionally there should not be any references to syslinux if you're using grub4dos.
-
Typically because of unsupported file system. Most likely NTFS. Starting with v3.7 Tiny Core, read access for NTFS is supported.
This particular individual did not realize they had to click the buttons to mount the drives.
-
TCL,
##########################################################
>>> This is the current "close" solution, thanks to "RICH on TCL forum".
# sda1 is the USB OS partition for bootup,
# sda2 is the USB DATA partition.
# Current boot-code will allow Backup to sda2/tc-e
# Current boot-code does not allow file-manager access to sda1 or sda2, which are Ext2.
# Current boot-code will allow access to all Linux Ext2 partitions, and another USB w Ext2.
### TinyCore : several options for testing per RICH TCL forum #########################
title ---{ TEST : TinyCore RICH TCL forum (sda2/tce sda2/tc-e & drops ram & Apps into my_data.gz )
root (hd0,0)
kernel /tc-core/bzImage quiet waitusb=10:UUID="60abc2ba-477e-43af-ae8a-7affc307fa31" tce=tc-e=UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6"
initrd /tc-core/tinycore.gz
####################################################
### Close to success & it does not cause Kernal Panic !!! ;D
####################################################
Right, RobertS, NTFS is not involved. Good URL.
Right, Rich, Mount is clicked sda1, sda2, everything is Ext2.
. . . . Still No File-manager access to sda1, sda2, but Backup goes to sda2.
. . . . Have access r/w to a different USB pendrive.
. . . . You are very thorough about 'covering bases'.
Right, Core, SysLinux.cfg is not involved, since the boot files are called directly by grub4dos..
# This boot-code will allow Backup to sda2/tc-e, when I insert the target.
# This boot-code ( & user-options) does not place Applications in /optional or onboot.lst.
# Current boot-code allows access sda2/tc-e & drops ram & Apps into my_data.gz
# First check shows both /tce and /tc-e being used, confusing. Cleanup/Restart.
# This boot-code does not allow file-manager access to sda1 or sda2.
# Was allow option of inserting "tc-e" during Backup/Restore setup.
# Perhaps I forgot to properly setup the Application-Downloader. Cleanup/Restart.
# Does not properly drop Apps into /tc-e/optional nor list in onboot.lst . Cleanup/Restart.
# Mixture of boot-code requirements and user-options during setup of Boot/Restore assignments.
# Will continue to Cleanup/Restart. to test boot-code and user-option combinations.
Notes are not accurate yet. Requires Cleanup/Restart to carefully track procedures/results.
Thanks for the tips.
The Final Result will be a Tiny-Core on USB which is hopefully:
(1) totally independent of the client's HD system which I want to repair
(2) and not alter the client's HD in any way !
:)
Back to my work,
glene77is
-
Hi glene77is
In your kernel line you have
tce=tc-e=UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6"
I don't know if tce=tc-e=UUID= is legal or not. Maybe one of the smarter people could comment.
-
tce=tc-e=UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6"
Looks wrong to me. Try
tce=UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6"
Still waiting on the smarter ones, though. ;D
-
Hi glene77is
In your kernel line you have
tce=tc-e=UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6"
I don't know if tce=tc-e=UUID= is legal or not. Maybe one of the smarter people could comment.
Rich,
Well, there is another problem, and I think it is a "design characteristic".
###
### TinyCore : several options for testing per RICH TCL forum
title ---{ TEST : TinyCore RICH TCL forum ( sda2/tce )
root (hd0,0)
kernel /tc-core/bzImage quiet waitusb=10:UUID="60abc2ba-477e-43af-ae8a-7affc307fa31" tce=UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6"
initrd /tc-core/tinycore.gz
###
The code does have some effect in the "sda2" direction, and does not bomb, exactly.
When the simple "/tce" is used everywhere, there is still a problem.
On Booting, TCL will load something from sda2/tce, too fast to read.
Bootup no error sometimes retains the green wallpaper I set.
Mount shows "sda2" already set to green.
Backup/Restore shows "sda2/tce" preset, and will accept an edit.
FileManager, select <TCE> shows "shortcut not available".
FileManager, shows "sda2" empty. (but it is mounted).
FileManager, Edit (show all, use sudo) of fluff.conf comes up as "Read/Write".
. . . Can see that Loc2Path=/mnt/sda2/tce.
. . . Can Save As to /home/tc/fluff_tc.cfg OK.
Application loaded previous as Ace-of-Penguins is saved in /home/tc, not associated with 'optional'.
App-Browser can load the Ace-of-Penguins and it shows 'loading' and 'OK.
App-Browser can try a load again, and it shows 'Already loaded".
Ace-of-Penguins will run from the Application-List OK. This time OK, but not on reboot.
Exit, Reboot, Backup, "sda2/tce", OK, two seconds runtime, and it reboots.
Rebooting into Ubuntu or Puppy in order to use PCMan (root) filemanager,
and I see that the /mnt/sda2/tce/optional subdir is empty, and the onlist.lst is empty.
Rebooting into TCL, per above boot-code, will open TCL as a fresh run,
with no /optional/extensions, no configs, brand spanking new.
I think there is a "design issue" involved:
TCL was designed as a Live-CD utilizing a "frugal" install technique
for saving configs / applications to a hosting HD.
TCL can be installed to a Live-USB utilizing a "frugal" install technique
for saving configs / applications to a hosting HD.
TCL has code for scanning for its components, and may have 'tce' hard coded somewhere.
( I have done the same in applications to simplify the installation,
allowing a few config params to be entered. )
Did I mention that the FileManager Editor will "save-as" and write to any mounted Linux device ? Yes.
Did I mention that the FileManager Editor will "save-as" and read filename lists on Linus devices ? Yes.
I'll pursue this a little further, but I have the "active Option" already to use Parted-Magic Live-USB to do these service tasks, running Only from USB pendrive, completely in RAM. Puppy Linux is the same, R/W from an independent (frugal) install to USB pendrive. So, this investigaton/development is not real urgent, but is Very Interesting ! I have met some sharp tacks on this TCL forum, and you are one !
glene77is
tce=tc-e=UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6"
Looks wrong to me. Try
tce=UUID="8f2b131a-3293-49c5-83b0-d443ea923eb6"
Still waiting on the smarter ones, though. ;D
########################################################
Rich and Lee,
The last post contained code just as you suggested "tce=UUID . . . ."
(although xxx=ccc=vvv is legal) and the results were encouraging,
but still acts like it needs to have another "/tce/optional"
somewhere else besides my "sda2/tce/optional".
It seems that "/tce" is correct, and that "/tc-e" will not work,
as if there is a hard-coded "/tce" that is causing the code to abort, without error.
. . . maybe there is a "find" for a different "/tce" hard coded,
which would fit right in with the "Live-CD" development,
which requires a co-host Hard Drive for a "frugal" install.
That would fit the "design issue" as I described in the post.
It has been very interesting, and I'll tinker some more, good at that ;)
but I need a new idea on this subject.
The goal is to have TCL on an independent USB pen-drive,
utilizing the USB pen-drive as the host for the "frugal" install !!! ;D
glene77is
-
The goal is to have TCL on an independent USB pen-drive,
utilizing the USB pen-drive as the host for the "frugal" install !!!
Using the Tiny Core provided install scripts USB-HDD or USB-ZIP for pendrive makes it easy.
To select not too, well, see all the continuing drama above! ;D
-
Hi glene77is
At this point I need to ask you a serious question as you seem to be making this harder than it
needs to be. Why are you trying to install Tinycore and it's applications on separate partitions on
your USB drive.
Also:
The goal is to have TCL on an independent USB pen-drive,
utilizing the USB pen-drive as the host for the "frugal" install !!!
If that's the case I'd highly recommend you take roberts advice. He knows more about Tinycore than
anyone else. If you want to listen to someone sharp, listen to him, I'm just a novice here.
-
Rich,
You have been very encouraging.
I have mostly completed my work on this little project.
and need to take a break,
let the "dust settle".
The boot-code included works OK.
Am using it on two USB pendrives now.
Both run USB OS code isolated from the HD, as I wanted.
Both can call/execute OS already installed on one of my HardDrive systems, as I wanted.
Hi glene77is
*** At this point I need to ask you a serious question
as you seem to be making this harder than it needs to be.
>>> I am having a great, interesting time, exploring scripting methods,
avoiding dependence on gui objects (which I spent years writing).
On the other hand, sometimes I must use the new gui tools and various Live-device OS available
to cover my lack of expertise with the differing syntax of grub, grub4dos, grub2, BASH scripting.
*** Why are you trying to install Tinycore and it's applications on separate partitions on
your USB drive.
>>> Data Security, only.
I fell into a long-term habit of isolating "created data".
Single partition should be simpler, as you suggest.
The goal is to have TCL on an independent USB pen-drive,
utilizing the USB pen-drive as the host for the "frugal" install !!!
If that's the case I'd highly recommend you take roberts advice.
He knows more about Tinycore than anyone else.
If you want to listen to someone sharp, listen to him,
I'm just a novice here.
[/quote]
>>> RobertS has given advice, and I have seen the work the 'sharp' engineer,
which is why I am spending some time to investigate how to work with it at the scripting level.
I am not prepared to spend many years following in those same foot-steps.
RobertS is way ahead of me in his field.
Sorry if I embarrased you.
Think I am tying up my own loose ends on a thread.
Here is a post of todays 'piddling' and 'mucking' as I push my little project forward.
Everything works OK. May be some test code as noted.
Boot-Code for my USB pendrive ( main )
with grub4dos controlling
(1) Puppy 5.25 USB ,
(2) Parted-Magic USB ,
(3) calling Puppy 5.25 on Live-CD (if in the CD drive)
with Puppy configs and Save and System.sfs on the Hard-Drive,
(4) Ubuntu on the HD
(5) M$ XP on the HD,
(6) Parted-Magic from the M$ XP partition on the HD:
(7) and other fancy stuff (just to see if it would work.
Everything works OK. May be some test code as noted.
# menu.lst produced by grub4dosconfig-v1.7
# 110616, gae, highly altered.
#
#############################################
color blue/cyan yellow/blue white/black cyan/brown
timeout 10
default 1
###
title ==={ USB Puppy GEEK sda1 }======
root (hd0,0)
title ------{^,^} Lupu 525 find (sdb1/lupu_525)
find --set-root --ignore-floppies --ignore-cd /lupu_525/initrd.gz
kernel /lupu_525/vmlinuz psubdir=lupu_525 pmedia=usbflash pfix=fsck
initrd /lupu_525/initrd.gz
title ---{ Lupu 525 find (sdb1/lupu_525) RAM mode \nBoot up Puppy without pupsave
find --set-root --ignore-floppies --ignore-cd /lupu_525/initrd.gz
kernel /lupu_525/vmlinuz psubdir=lupu_525 pmedia=usbflash pfix=ram,fsck
initrd /lupu_525/initrd.gz
title ---{ Lupu 525 chainloader (sdb1:PBS)
chainloader +1
##################33
title ------ EXTRA ------
root (hd0,0)
title ==={ Parted Magic sda1/pmagic in RAM }===
root (hd0,0)
kernel /pmagic/bzImage noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=791 sleep=10 loglevel=0 keymap=us
initrd /pmagic/initramfs
title ---{^,^}--- Lupu 520 frugal (sda5/pup52005) ---{^,^}---
find --set-root --ignore-floppies /pup52005/initrd.gz
kernel /pup52005/vmlinuz pmedia=atahd psubdir=pup52005 pfix=fsck
initrd /pup52005/initrd.gz
title ==={ Tinycore Linux sda1/boot in RAM }===
# needs more tweaking.
# root (hd0,0)
# kernel /boot/bzImage quiet
# initrd /boot/tinycore.gz
title --- Grub4Dos commandline
commandline
title --- Reboot computer
reboot
title --- Halt computer
halt
###
Everything works OK. May be some test code as noted.
#####################################################
About TINY-CORE, TCL method did not work completely on the new USB pendrive.
Needed to manually install MBR and grldr binary.
So, trying to use some of the new Live-Device-OS gui tools
to cover my lack of expertise with the differing syntax of grub, grub4dos, grub2, BASH scripting.
(1) Used Parted-Magic (gParted) from my HardDrive
to format the new USB pendrive as ext2.
(2) Used TCL on my HD to run Control_Panel => Install_USB
from the kernal on the HardDrive over to the new USB pendrive.
(3) Used Puppy 5.25 USB pendrive to run grub4dos_config
to send grub4dos to the new USB pendrive, and write a first-run menu.lst.
(4) upgraded the menu.lst to TCL compliant boot-code.
(5) copied Parted-Magic to /pmagic on USB pendrive, added to menu.lst.
(6) added calls to hda1, hda5 on the HardDrive for M$ and Ubuntu.
(7) probably left garbage at the end of the code.
Everything works OK. May be some test code as noted.
Boot-Code for the new USB pendrive primary for TINY-CORE Linux:
# menu.lst produced by grub4dosconfig-v1.7
# 110615W, gae, upgraded greatly.
#
color blue/cyan yellow/blue white/black cyan/brown
timeout 10
default 1
#############################################
title ---{ USB pendrive - grub4dos - TinyCore Linux }------------------------
root (hd0,0)
title ---{ TINY-CORE : Rich, TCL forum ( loads sda1/tce/optional/apps.tcz )---
# \n ( root, kernel+uuid, initrd )
root (hd0,0)
kernel /tc-sys/bzImage quiet waitusb=10:UUID="3384ff11-91f0-497b-bcbe-7d88760e2757" tce=UUID="3384ff11-91f0-497b-bcbe-7d88760e2757"
initrd /tc-sys/tinycore.gz
title ---{ UBUNTU - UUID - kernel + root - initrd - HD (sda5)--- \n Direct UUID
uuid 99c2c0f3-8258-42b7-85dd-0c575f162831
kernel /vmlinuz root=/dev/sda5 ro
initrd /initrd.img
title ---{ M$ XP - map - find - chainloader }--- \nBoot up Windows if installed
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
errorcheck off
find --set-root --ignore-floppies --ignore-cd /bootmgr
chainloader /bootmgr
find --set-root --ignore-floppies --ignore-cd /ntldr
chainloader /ntldr
find --set-root --ignore-floppies --ignore-cd /io.sys
chainloader /io.sys
errorcheck on
title ---{ M$ XP - map - uuid - chainloader (sda1:PBS)
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
uuid 3268A57F68A54289
chainloader +1
#############################################
title ---{ ADDITIONAL testing required }--------
root (hd0,0)
title Bootup from HDD\nBootup from the master boot record of the hard disk drive
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
chainloader (hd0)+1
title Find Grub menu on HDD
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
errorcheck off
find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst
find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst && configfile /boot/grub/menu.lst
find --set-root --ignore-floppies --ignore-cd /grub/menu.lst && configfile /grub/menu.lst
errorcheck on
commandline
title Find Grub2\nBoot up grub2 if installed
find --set-root --ignore-floppies --ignore-cd /boot/grub/core.img
kernel /boot/grub/core.img
title Grub4Dos commandline\n(for experts only)
commandline
title Reboot computer
reboot
title Halt computer
halt
###
Everything works OK. May be some test code as noted.
So, Thanks for your encouragement.
Today has been interesting
and will take a break from this, let the "dust settle down".
Have a call. Later.