WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: bootcodes  (Read 9165 times)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: bootcodes
« Reply #15 on: June 05, 2011, 11:55:17 PM »
You do not need to make a new iso.  Just burn the one you have.

Offline glene77is

  • Newbie
  • *
  • Posts: 31
  • Electrical Science, weightlifting, cycling.
    • personal website
Re: bootcodes
« Reply #16 on: June 06, 2011, 12:23:15 PM »
Along these same lines:

*** Live-CD with an install of core, apps, config, etc on the HD.
(1) I ran the Live-CD,
(2) installed the tinycore /boot onto my HD as /tinycore,
(3) altered the isolinux.conf to name the new /tinycore subdir,
(4) added script to my grub2, and it booted OK.   
(5) Loaded the app Abiword to /optional per your Apps_installer.
(6) rebooted OK from HD.   

*** USB flash drive install.
(1) copied my tinycore HD /tinycore" to a USB flash drive,
(2) copied across the HD /tce with the Abiword app in the /optional subdir.   
(3) No bootup, of course (ha).   
Fresh USB flash drive, with no MBR and no bootloader binary, no grub, no 'menu.lst'.
(4) installed   grub4dos,  added  the script for tinycore, and it booted OK.    :) 
(5) grub4dos located and scripted for (a) sda1/XP, and (b) sda5/Ubuntu.     
No conflict between any of these on the USB flash drive.   
(6) Since grub4dos was running,
Also added to the USB flash drive     ...(a) Puppy 5.25,     ...(b) Parted-Magic.
No conflict between any of these on the USB flash drive.   
USB will boot :
. . . (.a) TinyCore, (.b) Puppy 5.25, (.c) Parted-Magic, (.d) sda1/XP, (.e) sda5/Ubuntu, 
OK.  :)

*** However, to my surprise,     :o
(1) TinyCore would boot from USB,
and locate the HD /tce and load all the configs and apps from the HD. 
(2) TinyCore would not locate the local USB /tce
probably because the HD /tce configs were in control.
I added the boot code "kernal ... pmedia=usbflash", to no avail. (hope I spelled it right).

*** So,
As long as I only have one TinyCore installed & available to run in the system, I am OK.
Else, the USB TinyCore will find the HD /tce and run in a 'frugal' mode off the HD. 
Seems like that would be OK, except I need to have TinyCore running independently on the USB. 

*** I would like to be able to name the core subdir "/tc-core",  which I have done OK.
I would like to be able to name the extensions subdir to be "/tc-e", which I am trying to figure out.
That way, the USB TinyCore would "stay-put" on the USB, and not see any other "/tce" on the HD.

*** Then I would have the ability to introduce my USB TinyCore into a customers PC,
without reading the customers PC HD and auto-finding the customers /tce configs, etc.

*** also,
Running from the USB TinyCore, I am unable to get the filemanager to read the local sda1 & sda2.

*** Goal:
I would appreciate a point in the right direction to some documentation to handle these topics,   :)
--- I realize that these may be "Built-In" features of TinyCore.     ::)   
--- Happens in all systems, including my own developments.   8)
--- Sometimes there is no "fix" for these 'features' 
--- so thanks, for the pointing,    :)
and I don't expect a big answer, just some guided pointing.

glene77is

---{^,^}--- glene77is --- Electricity is Shocking

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: bootcodes
« Reply #17 on: June 06, 2011, 12:53:52 PM »
f you are going to run Tiny Core from a pendrive, or any removal device, you should be using UUID or LABEL, to properly identify the device.  The installation program for pendrives included with Tiny Core up to v3.6 provides an automatic setup with such features. You will also need a waitusb for slow removal devices to be detected. This is also provided with the install program.
« Last Edit: June 06, 2011, 12:56:32 PM by roberts »
10+ Years Contributing to Linux Open Source Projects.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: bootcodes
« Reply #18 on: June 06, 2011, 09:34:49 PM »
@glene77is: To add to Robert's point about using 'tce=LABEL=...' or 'tce=UUID=...' boot codes: There is nothing that stops you from adding a non-standard directory name to the device specification.

I've just done a quick test with installing TC (using a QEMU VM) to a (virtual) hard disk using the 'install.gz' starterpack (with TC 3.7rc3): After
    mount /mnt/hda1 ; mv /mnt/hda1/tce /mnt/hda1/tc-e
I changed in '/mnt/hda1/syslinux.cfg' the entry of
Code: [Select]
APPEND initrd=/boot/tinycore.gz quiet  waitusb=5:UUID="98F6-837D" tce=UUID="98F6-837D"to
Code: [Select]
APPEND initrd=/boot/tinycore.gz quiet  waitusb=5:UUID="98F6-837D" tce=UUID="98F6-837D"/tc-e
And indeed after a reboot I could confirm that the change was properly recognised:
Code: [Select]
tc@box:~$ cat /opt/.tce_dir
/mnt/hda1/tc-e
tc@box:~$

The same applies to other boot loaders or older TC versions. Mind you I did not go back to find out exactly since when 'tce=DEVICE/DIRECTORY' is supported in it's current form (where DEVICE could be 'UUID=...' and DIRECTORY some non-standard directory). But a quick re-test with TC 2.11.6 showed that it works this way since at least the end of the TC 2.x series.

Furthermore about the apparent failure to read 'sda1' and 'sda2': By default TC (unlike many other Linux distributions) does not auto-mount all devices it finds. Only the device containing the 'tce' directory (e.g. '/mnt/sda1/tc-e') would be mounted, all the others would need to be done either manually by the user (e.g. via the GUI 'mnttool') or via appropriate 'mount' commands that could be included in '/opt/bootlocal.sh' and therefore being repeated at boot time.
« Last Edit: June 06, 2011, 09:39:40 PM by maro »

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: bootcodes
« Reply #19 on: June 07, 2011, 12:44:53 AM »
Many people see what is. Some people see what can be, and make a difference.

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: bootcodes
« Reply #20 on: June 07, 2011, 12:46:21 AM »
Quote
Running from the USB TinyCore, I am unable to get the filemanager to read the local sda1 & sda2.

Mount them first.

To do this, click on the mount tool in the wbar at the bottom of the screen.
Many people see what is. Some people see what can be, and make a difference.

Offline glene77is

  • Newbie
  • *
  • Posts: 31
  • Electrical Science, weightlifting, cycling.
    • personal website
Re: bootcodes
« Reply #21 on: June 08, 2011, 01:15:15 PM »
Quote
Running from the USB TinyCore, I am unable to get the filemanager to read the local sda1 & sda2.

Mount them first.


@ GUY,
Thanks.  Sounds obvious, will review my process.
Need to move on to the info on the tce=LABEL, etc.

@ MARO,

Quote/
to
Code:

APPEND initrd=/boot/tinycore.gz quiet  waitusb=5:UUID="98F6-837D" tce=UUID="98F6-837D"/tc-e

And indeed after a reboot I could confirm that the change was properly recognised:
Code:

tc@box:~$ cat /opt/.tce_dir
/mnt/hda1/tc-e
tc@box:~$

/Quote

Thanks for the hints & tips.   
Will work on them.

glene77is
---{^,^}--- glene77is --- Electricity is Shocking

Offline glene77is

  • Newbie
  • *
  • Posts: 31
  • Electrical Science, weightlifting, cycling.
    • personal website
Re: bootcodes
« Reply #22 on: June 08, 2011, 05:48:55 PM »
Quote
Running from the USB TinyCore, I am unable to get the filemanager to read the local sda1 & sda2.

Mount them first.


@ GUY,
Think this particular USB pen-drive is different, but the difference is not known.
Four USB pen-drives made by Cruiser (Sans Disc).
On this particular one: Two partitions, both ext2, first has boot flag. 
Parted-Magic (Gparted) shows nothing unusual about this USB pen-drive.
Four USB pen-drives made by Cruiser (Sans Disc), all 8 GigByte, formatted ext2. 
Other three USB pen-drives are mountable and then exposed properly by the Fluff filemanager.
glene77is
---{^,^}--- glene77is --- Electricity is Shocking

Offline glene77is

  • Newbie
  • *
  • Posts: 31
  • Electrical Science, weightlifting, cycling.
    • personal website
Re: bootcodes
« Reply #23 on: June 08, 2011, 11:16:25 PM »
Maro,
I tried your code:
        APPEND initrd=/boot/tinycore.gz quiet  waitusb=5:UUID="98F6-837D" tce=UUID="98F6-837D"/tc-e
as
title ==={ T.C }--- TinyCore Linux 3.6 ---}===\n ---{ sda1/tinycore/bzImage }---
       #root  (hd0,0)   ### grub4dos numbering
   find --set-root /tinycore/bzImage
   kernel  /tinycore/bzImage  quiet
   #initrd                /tinycore/tinycore.gz
   APPEND    initrd=/tinycore/tinycore.gz  quiet   waitusb=5:UUID="98F6-837D"   tce=UUID="98F6-837D"/tc-e
        #PPEND    initrd=     /boot/tinycore.gz   quiet   waitusb=5:UUID="98F6-837D"   tce=UUID="98F6-837D"/tc-e

Looks like the same code.
Error was about "No Crossover", then "Kernal Panic".
Need to read up , then return to this procedue later.
Thanks for the help.  Looks interesting.
glene77is
---{^,^}--- glene77is --- Electricity is Shocking

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: bootcodes
« Reply #24 on: June 09, 2011, 06:21:07 PM »
OK, I admit I made the "colossal" mistake in my reply #18 not to have put in a reference to the relevant part of the FAQ (my weak "excuse" might be that I've written this or a similar sentence now probably 30+ times in this forum here and I'm getting a bit "slack").

Therefore: Don't use a UUID I've used in my little sample. The whole point of a "universally unique identifier" is just that, to be UNIQUE for your device. So find out your UUID (e.g. via blkid /dev/[hs][dr]*) for the file system in question, use it in your boot loader configuration file and the "world might be a better place" ...

Offline glene77is

  • Newbie
  • *
  • Posts: 31
  • Electrical Science, weightlifting, cycling.
    • personal website
Re: bootcodes
« Reply #25 on: June 09, 2011, 09:53:35 PM »
Maro,
You are a good man. Thanks for the fix.   :D

Will  read on the     
blkid /dev/[hs][dr]*

glene77is
---{^,^}--- glene77is --- Electricity is Shocking