[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ltsp-discuss
Subject:    [Ltsp-discuss] Ang: Fatclient when network / PXE booting is not possible
From:       Johan Kragsterman <johan.kragsterman () capvert ! se>
Date:       2015-09-11 12:39:46
Message-ID: OF3301CEA0.C34492D6-ONC1257EBD.00458F07-C1257EBD.00458F08 () inse ! com
[Download RAW message or body]

[Attachment #2 (unknown)]

<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" \
size="2"><div>Hi!</div><div><br></div><div>Nice!</div><div><br></div><div>DId you \
read my last mail with subject "lean and clean LTSP"? It sounds like you got inspired \
of that mail...?</div><div><br></div><div>I would like a system that is serving a \
diskless client an image via PXE/TFTP, that builds a RAM drive in the client \
computer, and connects and mount &nbsp;/home via nfs. Now a days RAM is cheap, so it \
is no problem to use that space in RAM that is needed.</div><div><br></div><div>I \
would like a server like LTSP to serve the image, and I want to be able to \
update/rebuild/develope the image \
centrally.</div><div><br></div><div><br></div><div>Regards \
Johan</div><div><br></div><br><font color="#990099">-----Valtteri Suojanen \
&lt;vsuojanen@gmail.com&gt; skrev: -----</font><div class="iNotesHistory" \
style="padding-left:5px;"><div \
style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">Till: \
ltsp-discuss@lists.sourceforge.net<br>Från: Valtteri Suojanen \
&lt;vsuojanen@gmail.com&gt;<br>Datum: 2015-09-11 14:10<br>Ärende: [Ltsp-discuss] \
Fatclient when network / PXE booting is not possible<br><br><div dir="ltr"><p> This \
is not a LTSP client and image doesn't require a network connection. This is designed \
for laptops that start the image locally. You can create and use the same ltsp client \
chroot image on server for both localboot clients (laptops) and ltsp fatclients. User \
is expecting the same image as he/she gets in the LTSP network at office/school.  \
</p>

<p>
One benefit of network/PXE booting is that you can update the client image once to \
all LTSP clients/users.  For testing purposes I started finding a way to get the \
localboot clients connecting every once in while securely to ltsp server or a \
separate image server. This allows laptop (or user) to download and update needed \
images.  </p>

<p>
I have created a special three partition layout to update &amp; rollback the images \
so that users don't have to manually go download new image or configure new settings \
when new image is stored on the disk. My goal was automating the update and rollback. \
The update &amp; rollback process uses some very simple shell scripts in the chroot \
image / initramfs image.  </p>

<br>

<p>
<a href="https://bitbucket.org/vsuojanen/root-updates/wiki/Home" \
title="https://bitbucket.org/vsuojanen/root-updates/wiki/Home" \
class="">https://bitbucket.org/vsuojanen/root-updates/wiki/Home</a> </p>

<p>
yes, it's very far from LTSP thin clients, it's just one expiriment to boot/update \
local images in clients. <br></p><p> It should be possible to continue developing the \
idea further if anyone is interested and I'm sure there are already people doing \
similar (and bigger) in their own multi-user Linux server environment. <br></p>

Is the idea of localboot images worth to use further in LTSP project ? <br><div>

<p>
Short overview how to set up the client localboot with your fatclient image:
</p>

<p>
</p><ol start="1" type="1"><li>Using localboot requires in chroot image a local user \
(guest/username), screen session and session settings</li></ol>


<p>
lts.conf
</p>

<p>
[default]<br>
SCREEN_04 = "shell"<br>
SCREEN_05 = "xterm"<br>
SCREEN_07 = "localboot"
</p>

<p>
/usr/share/ltsp/screen.d/localboot<br>
#!/bin/sh
</p>

<p>
/usr/sbin/lightdm<br>
#/usr/sbin/gdm
</p>

<p>
</p><ol start="2" type="1"><li>How do you stop LTSP boot in client ?</li></ol>


<p>
Here is one workaround to solve this problem in ubuntu 14.04:<br>
(this could work also with Debian)
</p>

<p>
Customize initramfs image in client chroot image (e.x. /opt/ltsp/i386)
</p>

<p>
/usr/share/initramfs-tools/init<br>
export serverip=
</p>

<p>
/usr/share/initramfs-tools/init-premount/udhcp<br>
# Exit if an LTSP boot was not requested<br>
grep -Eqsw "init=/sbin/init-ltsp|ltsp" /proc/cmdline || exit 0
</p>

<p>
grep -Eqsw "serverip=127.0.0.1" /proc/cmdline &amp;&amp; exit 0
</p>

<p>
Remember to update initramfs:
</p>

<p>
 update-initramfs -u
</p>

<p>
</p><ol start="3" type="1"><li>Creating the image and setup the local boot \
devie</li></ol>


<p>
Finally:<br>
ltsp-update-image
</p>

<p>
Default path for the chroot /boot is in /opt/ltsp/i386/boot
</p>

<p>
Copy /opt/ltsp/i386/boot/vmlinuz and /opt/ltsp/i386/boot/initrd.img to laptop hard \
drive or USB disk. </p>

<p>
Copy the client image i386.img to laptop hard drive or USB disk in a safely named \
location e.x.  /Boot/LTSP </p>

<p>
The bootloader configuration (how you start the laptop image) depends on the boot \
device and bootloader. </p>

<br>

<p>
e.x. Configuring USB and image loading with syslinux/extlinux
</p>

<p>
Install syslinux/extlinux:
</p>

<p>
sudo apt-get install extlinux mtools<br>
sudo fdisk -l (tarkista tulosteesta usb-tikun laitenimi)
</p>

<br>

<p>
Unmount the USB device and run:<br>
WRONG DEVICE NAME CAN DESTROY YOUR DATA!
</p>

<p>
sudo syslinux /dev/sdX1 (sdX1 = device/partition)
</p>

<p>
Make sure the UBS is bootable. Write MBR to beginning of the disk and set active \
partition.  </p>

<p>
dd conv=notrunc bs=440 count=1 if=mbr.bin of=/dev/sdX<br>
parted /dev/sdX set 1 boot on
</p>

<p>
fdisk, sfdisk or any other partitioning tool works here as good as parted. 
</p>

<p>
Copy /opt/ltsp/i386/boot/vmlinuz and /opt/ltsp/i386/boot/initrd.img to USB boot \
device root direcctory  </p>

<p>
Create syslinux.cfg
</p>

<p>
DEFAULT linux<br>
LABEL linux<br>
SAY Now booting the kernel from SYSLINUX...<br>
KERNEL vmlinuz<br>
APPEND ro initrd=initrd.img init=/sbin/init-ltsp root=/dev/sda2 rootflags=ro \
loop=/Boot/LTSP/i386.img serverip=127.0.0.1 </p>

<p>
USB booting with grub?<br>
Someone told me that with grub you can load Linux kernel and initrd from inside the \
loop device (i386.img). I hope I have time to test grub in some point and it sure \
looks like a good option. </p>

</div></div>
<div><font face="Courier New,Courier,monospace" \
size="3">------------------------------------------------------------------------------<br></font></div><div><font \
face="Courier New,Courier,monospace" \
size="3">_____________________________________________________________________<br>Ltsp-discuss \
mailing list. &nbsp; To un-subscribe, or change prefs, goto:<br>&nbsp;&nbsp; &nbsp; \
&nbsp;<a href="https://lists.sourceforge.net/lists/listinfo/ltsp-discuss">https://lists.sourceforge.net/lists/listinfo/ltsp-discuss</a><br>For \
additional LTSP help, &nbsp; try #ltsp channel on \
irc.freenode.net<br></font></div></div></div><div></div></font>



------------------------------------------------------------------------------


_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic