Create a custom firmware image
From NAS-Central Buffalo - The Linkstation Wiki
Mindbender (Talk | contribs) m (→Howto enable telnet) |
m |
||
| Line 110: | Line 110: | ||
'''1)''' place | '''1)''' place | ||
PPC: | PPC: | ||
| - | http://downloads. | + | http://downloads.nas-central.org/Uploads/OldUploads/LS1-HG-HS_PPC/BINARIES/utelnetd |
MIPSel: | MIPSel: | ||
| Line 116: | Line 116: | ||
to sbin and | to sbin and | ||
PPC: | PPC: | ||
| - | http://downloads. | + | http://downloads.nas-central.org/Uploads/OldUploads/LS1-HG-HS/STARTSCRIPTS/utelnetd |
MIPSel: | MIPSel: | ||
Revision as of 02:24, 11 September 2007
Most of this information was taken from the excellent hacking how-to of geishuettners page.
|
Contents |
General
This is a description how someone can create a custom firmware image.
This is also the way any special distribution (Projects/OpenLink,Projects/FreeLink,Projects/GenLink) gets developed. (and of course - this was the way how telnet was added to the images)
There is only one requirment ->You have to know the password of image.dat/hddrootfs.img
Here all passwords are collected: FAQ
Old Variants - LS1/LS2/HG/HS
1) unzip the image.dat that resides in the zip-file of the base image with the right password
unzip image.dat
provide the right password for the firmware.
the result of this is a tmpimage.tgz...this is the tared root-filesystem of the firmware image.
2) create a folder where you want to untar the image and untar it
mkdir <foldername> cd <foldername> tar -vxz --numeric-owner -p -f ../tmpimage.tgz
now you can see the root-filesystem which normaly resides on /dev/hda1 (or / )
3) modify the image as you like
Advice: use relative paths if you create symlinks. absolute paths won`t work.
For example you could add telnet as outlined below.
4) create the tmpimage.tgz again
(you should be in the folder where you extracted the image)
tar -vczf ../tmpimage-new.tgz . cd .. mv tmpimage.tgz tmpimage-old.tgz mv tmpimage-new.tgz tmpimage.tgz
5) create the image.dat again
CAUTION: if you use the wrong password, the firmware updater / the linkstation will fail to unzip the image.dat.....this means you will have a wiped /dev/hda1 with no files on it.
Opening the case will be the only possible solutions.
zip -e image.dat tmpimage.tgz
you should have a custom image.dat afterwards :)
New Variant - LSPro/LSLive
Note: For the LS Pro (LS-GL), image.dat is called hddrootfs.img and the tarball of the root file system is called hddrootfs.buffalo.updated .
1) unzip the hddrootfs.img
unzip hddrootfs.img
provide the right password for the firmware.
the result of this is a hddrootfs.buffalo.updated...this is the tared root-filesystem of the firmware image.
2) create a folder where you want to untar the rootfs and untar it
mkdir <foldername> cd <foldername> tar -vxz --numeric-owner -p -f ../hddrootfs.buffalo.updated
now you can see the root-filesystem which normaly resides on /dev/sda2 (or / )
3) modify the image as you like
Advice: use relative paths if you create symlinks. absolute paths won`t work.
For example you could add telnet as outlined below.
4) create the hddrootfs.buffalo.updated again (you should be in the folder where you extracted the image)
Note: The LS-GL must be tared with the -C flag
tar -vczf ../hddrootfs.buffalo.updated-new -C /absolute/pathe/to/extracted_image dir1 dir2
dir1, dir2, and so forth are the directories located under the extracted image folder (i.e. bin, dev, etc, home, lib, ...)
cd .. mv hddrootfs.buffalo.updated hddrootfs.buffalo.updated-old mv hddrootfs.buffalo.updated-net hddrootfs.buffalo.updated
5) create the hddrootfs.img again
CAUTION: if you use the wrong password, the firmware updater / the linkstation will fail to unzip the hddrootfs.img.....this means you will have a wiped /dev/sda2 with no files on it.
Opening the case will be the only possible solutions.
zip -e hddrootfs.img hddrootfs.buffalo.updated
you should have a custom hddrootfs.img afterwards :)
Howto enable telnet
1) place
PPC: http://downloads.nas-central.org/Uploads/OldUploads/LS1-HG-HS_PPC/BINARIES/utelnetd MIPSel: ?
to sbin and
PPC: http://downloads.nas-central.org/Uploads/OldUploads/LS1-HG-HS/STARTSCRIPTS/utelnetd
MIPSel: ?
to etc/init.d/
2) create the symlink so telnetd starts at startup
cd etc/rc.d/rc2.d ln -s ../../init.d/utelnetd S07utelnetd
3) modify additional stuff or go on with point 4 of the general article


