WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Hard drive install cannot find opt stuff  (Read 2903 times)

Offline yoroce

  • Newbie
  • *
  • Posts: 11
Hard drive install cannot find opt stuff
« on: December 11, 2016, 03:00:19 PM »
I'm new to Tiny Core. After playing with it for a while I installed it from CorePlus into the /tce directory of a partition that already has Lubuntu on it. I've added Tiny Core to GRUB2, and I can boot into it, but when I boot Tiny Core can't find any of the extensions from the installer (so, for example, startx doesn't exist). The directory /usr/local/tce.installed is completely empty. However, from Lubuntu, I can see that there's all kinds of stuff in /tce/optional.

Here are the relevant GRUB configuration lines:

menuentry "TinyCore"{
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set=root 81633858-9365-45c3-ba7b-09220bf2680e
        linux /tce/boot/vmlinuz root=UUID=81633858-9365-45c3-ba7b-09220bf2680e norestore home=mmcblk0p1 opt=mmcblk0p1 swap=mmcblk0p5
        initrd /tce/boot/core.gz
}


My guess was that the "opt=mmcblk0p1" bit wasn't working for some reason, but I can't figure out why. If I run dmesg in Tiny Core I see a line that starts with "Kernel command line:" and does indeed include "home=mmcblk0p1 opt=mmcblk0p1 swap=mmcblk0p5". Further, from within Tiny Core I can mount /dev/mmcblk0p1 and sure enough the .tcz files are right there in /mnt/mmcblk0p1/tce/optional. I've also tried replacing mmcblk0p1 with its UUID in GRUB but it didn't help.

It's of less importance to me, but "swap=mmcblk0p5" doesn't seem to be doing anything either.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: Hard drive install cannot find opt stuff
« Reply #1 on: December 11, 2016, 03:20:47 PM »
I thought the /tce directory was automatically sought at boot, but just in case try adding the tce=xyz bootcode?
http://wiki.tinycorelinux.net/wiki:boot_options

Offline yoroce

  • Newbie
  • *
  • Posts: 11
Re: Hard drive install cannot find opt stuff
« Reply #2 on: December 11, 2016, 03:45:02 PM »
Thanks, nitram. I've added tce=mmcblk0p1 to my GRUB configuration, but it doesn't seem to have changed anything.

I should have explained a little further why I think it's important that the swap partition is available. I don't sthink I'm getting any of the resources specified in these bootcodes, just the root file system.

Offline nitram

  • Hero Member
  • *****
  • Posts: 1054
Re: Hard drive install cannot find opt stuff
« Reply #3 on: December 11, 2016, 05:30:06 PM »
Few things to try, don't know if it helps, others will know better.

My GRUB Legacy format is simpler and works well, for example no { } or ' ' required:
Code: [Select]
title           dCore-jessie
root            (hd0,4)
kernel          /boot/dCore/vmlinuz-jessie showapps tce=sda5 desktop=flwm
initrd          /boot/dCore/dCore-jessie.gz

I don't think your GRUB configuration should need this line, root was already set with  set root=(hd0,1) :
Code: [Select]
search --no-floppy --fs-uuid --set=root 81633858-9365-45c3-ba7b-09220bf2680e

Tiny Core automatically finds a dedicated swap partition, should be no need for a swap bootcode. There is a  swapfile  bootcode but it isn't relevant for you, as you want and have an existing swap partition. You could add the  nozswap  bootcode if you wish, less CPU overhead, as you plan to use swap partition anyway.

I don't think the 'linux...' line needs to specify yet again what root is. Also boot Tiny Core and run 'cat /etc/fstab', then try the device or mount point names instead.

I would use this, sub 'sda1' with whatever partition(s) you've set up for Tiny Core, sub desktop=flwm with whatever WM you installed:
Code: [Select]
menuentry "TinyCore"
        set root=(hd0,1)
        linux /tce/boot/vmlinuz home=sda1 opt=sda1 tce=sda1 nozswap desktop=flwm
        initrd /tce/boot/core.gz

Offline yoroce

  • Newbie
  • *
  • Posts: 11
Re: Hard drive install cannot find opt stuff
« Reply #4 on: December 11, 2016, 08:13:05 PM »
I had to put the curly braces back in. Once I did I got the same result as before.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Hard drive install cannot find opt stuff
« Reply #5 on: December 11, 2016, 08:19:23 PM »
Here are the relevant GRUB configuration lines:

menuentry "TinyCore"{
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set=root 81633858-9365-45c3-ba7b-09220bf2680e
        linux /tce/boot/vmlinuz root=UUID=81633858-9365-45c3-ba7b-09220bf2680e norestore home=mmcblk0p1 opt=mmcblk0p1 swap=mmcblk0p5
        initrd /tce/boot/core.gz
}


First, you're confusing the boot loader with three separate "root" paths.  Thing is I've never found a need for set root, but it's the default if you use grub installer so I usually leave it in place.

However,  it looks like you're using an SDCARD as boot media??  therefore you'll need the waitusb bootcode as shown here.   Waitusb was designed for slow devices, but I have to say that I use the waitusb bootcode on all media devices without exception (it's probably the only bootcode you'll ever need). I use on HDD's, SSD's even some extreemely fast "PCIe SSD's" USB's etc etc, because no matter how fast you'd like to think a media device is, it's likely the slowest component on the system and is doubtful if it will be detected in time.   So I recommend you follow this example:

I always specify the tce directory path because I have so many.  Whether it's needed? no I don't think so but it will prevent accidentally using the wrong installation

here's a typical grub2 config (from one of my systems)
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=12
set timeout=60

menuentry "TC-7-x86 (Xorg on SSD)" {
search --no-floppy --fs-uuid --set=root 196fcfb2-bd37-495d-b855-41f08201be7d
linux /linux/vmlinuz 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"
initrd /linux/rootfs.gz /linux/modules.gz
}



To start, I'd try something like this:
Code: [Select]
menuentry "TinyCore"{
        search --no-floppy --fs-uuid --set=root 81633858-9365-45c3-ba7b-09220bf2680e
        linux /tce/boot/vmlinuz waitusb=5:UUID="81633858-9365-45c3-ba7b-09220bf2680e" tce=UUID="81633858-9365-45c3-ba7b-09220bf2680e"
        initrd /tce/boot/core.gz
}
« Last Edit: December 11, 2016, 08:52:13 PM by coreplayer2 »

Offline yoroce

  • Newbie
  • *
  • Posts: 11
Re: Hard drive install cannot find opt stuff
« Reply #6 on: December 11, 2016, 08:47:24 PM »
Ha, not exactly using an SDCARD as boot media. I'm using an Acer Cloudbook with an eMMC drive, which Linux sniffs out as more or less equivalent to an SDCARD.

At any rate, the waitusb bootcode did it. Thank you! I guess it goes to show how much slower eMMC is than a real SSD.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Hard drive install cannot find opt stuff
« Reply #7 on: December 11, 2016, 08:57:54 PM »
Good, actually I just added a suggested boot stanza to my last post as a starting point.

Another thing, you'll need to specify if using a Label or UUID with home and OPT otherwise they won't be found either.  Use my example as a guide
« Last Edit: December 11, 2016, 09:00:25 PM by coreplayer2 »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Hard drive install cannot find opt stuff
« Reply #8 on: December 11, 2016, 10:39:46 PM »
I guess it goes to show how much slower eMMC is than a real SSD.
SSD's and eMMC's are fast, at least better than dinosaur HDD's we've suffered with for decades.   But lets face it, even SSD's are slow while forced to use an outdated SATA interface.   Not even SATA3 is fast enough for me..  Flash nand is still fast despite a crippling interface and an eMMC is better than a HDD in most cases  ;D   Soon we'll get global utilization of M.2 interface using PCIe, then we can expect more speed.

« Last Edit: December 11, 2016, 10:48:09 PM by coreplayer2 »