Tiny Core Linux

General TC => General TC Talk => Topic started by: otheus on November 24, 2015, 06:27:01 PM

Title: Need guidance on atypical but simple setup
Post by: otheus on November 24, 2015, 06:27:01 PM
Greetings, old-time Linux user here. (old, as in first kernel was 0.96 pl12). My meta-problem here is that there is so much information here, and all of it is at slight variance to what I actually need, and those slight variances seem to have a lot of impact. My first attempt at booting into TCL resulted in a blank, inactive screen followed by (eventually) a kernel panic. Now, here's what my requirements and constraints are:


That last one is a bit of a kicker, ain't it? Now please don't tell me "with RHEV you can add CD-ROM..." blah blah. OK, I can't.  I could PXE boot too, but that opens up the same can of worms. (Why? Let's just say: over-compartmentalization in our organization.)  Also, upgrading Grub is not an option.

That leaves working with the vmzlinuz and initrd files directly, which I'm comfortable with. My only attempt, which included no boot "codes" (as you call them for some reason; I call them boot-loader options or kernel parameters), resulted in a blank screen followed eventually by a kernel panic. I used the "jessie" release of dCore. Why? Because I have no idea what I'm doing, there are too many options, and that seemed like what I wanted.

Much thanks for any clear help.

PS: this forum's anti-bot/spam filters are a little bit insane.I can't read any of the captchas, and really? validate for every post?
Title: Re: Need guidance on atypical but simple setup
Post by: gerald_clark on November 25, 2015, 12:30:34 AM
If you are going to use dcore, it's not so simple.
Start by reading the cor concepts, installation, and book from the home page.
Title: Re: Need guidance on atypical but simple setup
Post by: curaga on November 25, 2015, 06:12:40 AM
Please try the standard Core first. Download vmlinuz and core.gz from here, boot with your current method.
ftp://ftp.nluug.nl/pub/ibiblio/distributions/tinycorelinux/6.x/x86/release/distribution_files/
Title: Re: Need guidance on atypical but simple setup
Post by: otheus on November 25, 2015, 08:08:45 AM
Start by reading the cor concepts, installation, and book from the home page.
At first I was like, "hunh"? Yeah, somehow the homepage never found its way into my google search results. I was looking at 15 different other "starter" pages, all geared towards USB/Windows setups. But indeed, http://tinycorelinux.net/ is exactly what I was hoping to find.
Title: Re: Need guidance on atypical but simple setup
Post by: otheus on November 25, 2015, 09:53:35 AM
First, the book is very very good. Would everyone write document so cleanly, so clearly. Hell, I'd be much happier if 1/100th of popular open source projects had documentation that clean.  But... there are some glaring weaknesses. (I hope this feedback is not unwelcomed.) First, while much of the book deals with a new installation of TC but there's no mention of configuring networking. Maybe it assumes everyone just has DHCP these days, which I guess is pretty reasonable, but it doesn't address the proxy issue, and I don't see the DHCP assumption mentioned anywhere.

Second, I couldn't use the link to FTP for the reason that I can't get it to work through our proxy. I used http://www.tinycorelinux.net/6.x/x86_64/release/distribution_files/. Could it be that coreplus64 lacks the tools I need? (See below).

Third, coreplus64 booted well enough for me; however -- and I would appreciate help with some of these:
Title: Re: Need guidance on atypical but simple setup
Post by: Juanito on November 25, 2015, 10:00:08 AM
There's a gui applet to configure networking in the cpanel.

For the others, you'll need to build your own extensions (which would be gratefully received in the repo) or convince somebody to build them for you.
Title: Re: Need guidance on atypical but simple setup
Post by: otheus on November 25, 2015, 10:58:33 AM
"There's a gui applet to configure networking in the cpanel."

I'm not working with a GUI.

So what's the "native" mechanism whereby networking is setup?
Title: Re: Need guidance on atypical but simple setup
Post by: otheus on November 25, 2015, 11:21:33 AM
Refactoring my questions:


so: (1) networking and (2) LVM (research in progress) and (3) xfs toolset. If gerald_clark is correct about xfs, and that's the only thing, I think I can proceed.
Title: Re: Need guidance on atypical but simple setup
Post by: Rich on November 25, 2015, 11:29:33 AM
Hi otheus
Basically all the networking applet does is create a script in  /opt/, mine looks like this:
Code: [Select]
tc@box:~/guilib/grabber/grabber-1.1$ cat /opt/eth0.sh
#!/bin/sh
pkill udhcpc
ifconfig eth0 192.168.1.30 netmask 255.255.255.0 broadcast 192.168.1.255 up
route add default gw 192.168.1.1
echo nameserver 68.237.161.12 > /etc/resolv.conf
echo nameserver 71.243.0.12 >> /etc/resolv.conf
tc@box:~/guilib/grabber/grabber-1.1$
That script is then called from  /opt/bootlocal.sh.
Title: Re: Need guidance on atypical but simple setup
Post by: curaga on November 25, 2015, 02:40:30 PM
xfs-progs is available in the 32-bit repo, but it should be easy to build for 64-bit, install compiletc.tcz for the toolchain. The device-mapper modules are in the raid-dm-* extension.
Title: Re: Need guidance on atypical but simple setup
Post by: otheus on November 25, 2015, 02:56:06 PM
Thanks Rich!So you modified /opt/bootlocal.sh which gets called on early during the boot process. And you've made your /opt persistent somehow, right? That's very useful.

Now currently I have a problem where persistence simply doesn't work. If I specify both opt= and tce= to the same device, the system never boots. Example: boot code is:
   opt=vdb1/opt


The http://wiki.tinycorelinux.net/wiki:persistence_for_dummies doc says:
 
Quote
Another way of saving your stuff, is to tell tcl to use permanent directories for /opt and /home located on a storage medium. This is also done via boot codes, with ”opt=sda1” and ”home=sda1”. ... If they don't already exist in the specified locations, they will be freshly created there and populated with all the default files.

But that's not the case. Further, if I specify both "opt=..." and "tce=..." and they're the same drive, tcl refuses to boot. Have I found a bug or am I doing something wrong? EDIT: IN the x86 /32 bit release I can specify both with no ill effects, but /opt is not created. However the twist is: I can't download any extensions at all!
Title: Re: Need guidance on atypical but simple setup
Post by: otheus on November 25, 2015, 03:22:10 PM
xfs-progs is available in the 32-bit repo, but it should be easy to build for 64-bit, install compiletc.tcz for the toolchain. The device-mapper modules are in the raid-dm-* extension.
Brilliant! I used the 32-bit version. I only needed the xfsprogs, filesystems, and lvm2 pacakges; the rest were taken care of by dependencies. The 32-bit repo also solved a number of other minor issues. In the short run, this is sufficient for my needs. Thanks.

Now if I can only get persistence to work.
Title: Re: Need guidance on atypical but simple setup
Post by: gerald_clark on November 25, 2015, 03:50:59 PM
You cannot define alternate directories for opt and home, only the device.

opt=sda1
Title: Re: Need guidance on atypical but simple setup
Post by: otheus on November 25, 2015, 04:09:44 PM
You cannot define alternate directories for opt and home, only the device.

opt=sda1
I also tried this, to no avail. Neither for opt nor tce.

I read something that for text/command-line boots, it won't backup automatically. Could that be what's going on here?
Title: Re: Need guidance on atypical but simple setup
Post by: gerald_clark on November 25, 2015, 04:16:16 PM
You can use the backup command to backup before shutting down.
IF you are using the opt= and home= bootcodes, do NOT include them in /opt/.filetool.lst.

Show us the output of 'showbootcodes'.
Title: Re: Need guidance on atypical but simple setup
Post by: patrikg on November 26, 2015, 09:50:53 AM
You could also add nodhcp to the commandline for the kernel (bootcodes), to tell that udhcpc don't run with boot so you don't need to kill the udhcpc in your eth0.sh file.

Hi otheus
Basically all the networking applet does is create a script in  /opt/, mine looks like this:
Code: [Select]
tc@box:~/guilib/grabber/grabber-1.1$ cat /opt/eth0.sh
#!/bin/sh
pkill udhcpc
ifconfig eth0 192.168.1.30 netmask 255.255.255.0 broadcast 192.168.1.255 up
route add default gw 192.168.1.1
echo nameserver 68.237.161.12 > /etc/resolv.conf
echo nameserver 71.243.0.12 >> /etc/resolv.conf
tc@box:~/guilib/grabber/grabber-1.1$
That script is then called from  /opt/bootlocal.sh.
Title: Re: Need guidance on atypical but simple setup
Post by: otheus on November 27, 2015, 05:31:13 AM
"Show us your bootcodes"  -- you were looking at them in the previous posts. That's it. All of them. opt=XXX or tce=XXX or some combination of the two.


The documentation indicates (but it's not 100% clear) on the wiki and book that tce=DRIVE/dir should do the following:

Am I correct that this is the expected behavior? If not, can someone point me to the documentation or source that does define the actual behavior? I can read source code; it just helps to know which code I need to look for.
Title: Re: Need guidance on atypical but simple setup
Post by: Misalf on November 27, 2015, 05:56:54 AM
That's not
"Show us your bootcodes"
but
Show us the output of 'showbootcodes'.

For example, This is what I get
Code: [Select]
logo.nologo  cron  quiet loglevel=3  vga=788 video=inteldrmfb:ywrap,mtrr:3  blacklist=pcmcia,ssb,b43,bcma,rt2860sta,bluetooth,btusb  noutc  tce=UUID="cb6f8b98-91fd-4c96-b115-3d2bb9cb3e57"/tce-6.x swapfile=sda1  nozswap mydata=myxorg  laptop  nodhcp  desktop=openbox 
Title: Re: Need guidance on atypical but simple setup
Post by: otheus on November 27, 2015, 10:00:37 AM
That's not
"Show us your bootcodes"
but
Show us the output of 'showbootcodes'.

For example, This is what I get
Code: [Select]
logo.nologo  cron  quiet loglevel=3  vga=788 video=inteldrmfb:ywrap,mtrr:3  blacklist=pcmcia,ssb,b43,bcma,rt2860sta,bluetooth,btusb  noutc  tce=UUID="cb6f8b98-91fd-4c96-b115-3d2bb9cb3e57"/tce-6.x swapfile=sda1  nozswap mydata=myxorg  laptop  nodhcp  desktop=openbox 

Heh. OK:

Code: [Select]
tc@box:~$ showbootcodes
opt=vdb1/opt tce=vd1/tce

Title: Re: Need guidance on atypical but simple setup
Post by: Misalf on November 27, 2015, 11:03:11 AM
If I specify both opt= and tce= to the same device, the system never boots. Example: boot code is:
   opt=vdb1/opt
Code: [Select]
tc@box:~$ showbootcodes
opt=vdb1/opt tce=vd1/tce

"vdb1" != "vd1"
Title: Re: Need guidance on atypical but simple setup
Post by: otheus on November 27, 2015, 01:13:32 PM
That was a typo in the manual copy/paste operation. (I'm using VNC which doesn't support text copy/paste, so I manually typed in what I saw on the screen).
Title: Re: Need guidance on atypical but simple setup
Post by: gerald_clark on November 28, 2015, 08:10:31 PM
opt=vdb1/opt should be opt=vdb1
You cannot specify a directory with opt or home.