Create a Custom Capsule (aka Custom Firmware) [with root]

Post Reply
Mijzelf
Posts: 6226
Joined: Mon Jun 16, 2008 10:45 am

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by Mijzelf » Fri Jul 13, 2012 2:25 pm

tripex wrote:And after that a massive amount of weird ASCII chars.
Strange. The first line after the gibberish is a logline after the reboot. Sorry, I don't know how to interpret this. Does the xml header of your capsule look normal? Do you see the same result using the 'official' capsule?

tripex
Posts: 9
Joined: Wed Jul 11, 2012 12:47 pm

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by tripex » Fri Jul 13, 2012 3:17 pm

When I try to update via /Update folder any older version will procude such ASCII lines, but after checking the SHA-1 hash off rootfs.tar.lzma.
When I update to a newer version via /Update, everything works.

This is the header of my custom capsule:

Code: Select all

<Capsule>
	<Version>0.2</Version>
	<Device>
		<Hardware>
			<Arch>arm</Arch>
			<Subarch>feroceon_kw</Subarch>
			<Id>netspace_v2</Id>
			<Revision>2.0</Revision>
		</Hardware>
		<ProductId>networkspace2</ProductId>
	</Device>
	<Type>update</Type>
	<ReleaseDate>2012-02-15</ReleaseDate>
	<Main>
		<File>uImage</File>
		<SHA1>fa9154ef63fe8961352f839ea6b33a667d8a02c8</SHA1>
	</Main>
	<Update>
		<Version>2.2.5.1</Version>
		<MinimalVersion>1.0.1</MinimalVersion>
		<TargetVersionList>1.0.1 1.0.2 1.2.2 1.2.4 1.2.5 1.2.6 1.2.7 1.2.9 1.2.91 1.2.92 1.2.93 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.2 2.2.3 2.2.4 2.2.5</TargetVersionList>
		<TemporaryStorage>RAM</TemporaryStorage>
		<BootFS>
			<File>repository/bootfs.tar.lzma</File>
			<SHA1>b65c07165979b95b7c55323ecfd1629a9e9fb1d1</SHA1>
		</BootFS>
		<db_patch.tar.lzma>
			<File>repository/db_patch.tar.lzma</File>
			<SHA1>3a2050c8ff310ec72c7bd22e710702bb76e8851c</SHA1>
		</db_patch.tar.lzma>
		<RootFS>
			<File>repository/rootfs.tar.lzma</File>
			<SHA1>d2472f7de6bc89f7c77e4a54ffa8b2.2.5.13e95db</SHA1>
		</RootFS>
		<rootfs_files_to_remove.txt>
			<File>repository/rootfs_files_to_remove.txt</File>
			<SHA1>f35f84b694c842c41c07ada3f26d69939e8d8ee0</SHA1>
		</rootfs_files_to_remove.txt>
		<Kernel>
			<File>repository/uImage</File>
			<SHA1>6de6dd1b3ca5eb1ef57d5f17b14e24ad2ffaecf8</SHA1>
		</Kernel>
	</Update>
	<Exec>
		<Before>
			<File>exec/pre_exec/checkLogSize.sh</File>
			<SHA1>b026bb7a2750d7d7fa4ae4aa5e4ae12e4abdb608</SHA1>
		</Before>
		<Before>
			<File>exec/pre_exec/removeOldFiles.sh</File>
			<SHA1>d47fe5d99c6b20a755336e93004ef75a12c8aaea</SHA1>
		</Before>
		<Before>
			<File>exec/pre_exec/updateBootfsLib.sh</File>
			<SHA1>46ca4b602b0227bc3d47b67f545c1856d2fcaafa</SHA1>
		</Before>
		<After>
			<File>exec/post_exec/cleanupLegacyFiles.sh</File>
			<SHA1>ce2749eb8828d4a6391980046c46f1c483c6b11a</SHA1>
		</After>
	</Exec>
</Capsule>
./
	<Version>0.2</Version>
	<Device>
		<Hardware>
			<Arch>arm</Arch>
			<Subarch>feroceon_kw</Subarch>
			<Id>netspace_v2</Id>
			<Revision>2.0</Revision>
		</Hardware>
		<ProductId>networkspace2</ProductId>
	</Device>
	<Type>update</Type>
	<ReleaseDate>2012-02-15</ReleaseDate>
	<Main>
		<File>uImage</File>
		<SHA1>fa9154ef63fe8961352f839ea6b33a667d8a02c8</SHA1>
	</Main>
	<Update>
		<Version>2.2.5.1</Version>
		<MinimalVersion>1.0.1</MinimalVersion>
		<TargetVersionList>1.0.1 1.0.2 1.2.2 1.2.4 1.2.5 1.2.6 1.2.7 1.2.9 1.2.91 1.2.92 1.2.93 2.0.4 2.0.5 2.0.6 2.1.0 2.1.1 2.1.2 2.2.3 2.2.4 2.2.5</TargetVersionList>
		<TemporaryStorage>RAM</TemporaryStorage>
		<BootFS>
			<File>repository/bootfs.tar.lzma</File>
			<SHA1>b65c07165979b95b7c55323ecfd1629a9e9fb1d1</SHA1>
		</BootFS>
		<db_patch.tar.lzma>
			<File>repository/db_patch.tar.lzma</File>
			<SHA1>3a2050c8ff310ec72c7bd22e710702bb76e8851c</SHA1>
		</db_patch.tar.lzma>
		<RootFS>
			<File>repository/rootfs.tar.lzma</File>
			<SHA1>d2472f7de6bc89f7c77e4a54ffa8b2.2.5.13e95db</SHA1>
		</RootFS>
		<rootfs_files_to_remove.txt>
			<File>repository/rootfs_files_to_remove.txt</File>
			<SHA1>f35f84b694c842c41c07ada3f26d69939e8d8ee0</SHA1>
		</rootfs_files_to_remove.txt>
		<Kernel>
			<File>repository/uImage</File>
			<SHA1>6de6dd1b3ca5eb1ef57d5f17b14e24ad2ffaecf8</SHA1>
		</Kernel>
	</Update>
	<Exec>
		<Before>
			<File>exec/pre_exec/checkLogSize.sh</File>
			<SHA1>b026bb7a2750d7d7fa4ae4aa5e4ae12e4abdb608</SHA1>
		</Before>
		<Before>
			<File>exec/pre_exec/removeOldFiles.sh</File>
			<SHA1>d47fe5d99c6b20a755336e93004ef75a12c8aaea</SHA1>
		</Before>
		<Before>
			<File>exec/pre_exec/updateBootfsLib.sh</File>
			<SHA1>46ca4b602b0227bc3d47b67f545c1856d2fcaafa</SHA1>
		</Before>
		<After>
			<File>exec/post_exec/cleanupLegacyFiles.sh</File>
			<SHA1>ce2749eb8828d4a6391980046c46f1c483c6b11a</SHA1>
		</After>
	</Exec>
</Capsule>

Mijzelf
Posts: 6226
Joined: Mon Jun 16, 2008 10:45 am

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by Mijzelf » Fri Jul 13, 2012 6:18 pm

tripex wrote:This is the header of my custom capsule:
Looks good to me.
When I try to update via /Update folder any older version will procude such ASCII lines, but after checking the SHA-1 hash off rootfs.tar.lzma.
When I update to a newer version via /Update, everything works.
'Any older version'. Do you mean downgrading? Unicorn explicitly forbids this:
/usr/lib/python2.6/site-packages/unicorn/system/capsule.py wrote:# If capsule type is not 'init', check that capsule version is
# strictly greater than current version
if c_type != 'init':
if SystemVersion(info_config.software_version) >= SystemVersion(c_version):
logging.debug('capsule version(%s) <= %s', c_version, info_config.software_version)
raise CapsuleSystemVersionException('downgrade is forbidden')
What is your goal?

tripex
Posts: 9
Joined: Wed Jul 11, 2012 12:47 pm

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by tripex » Fri Jul 13, 2012 8:48 pm

My goal was to check if I get this bogues messages/ASCII again. And that did happen, but in another step than the custom capsules. When I upgraded from 2.2.5 to 2.2.8 via /Update everythign went smooth, no messages, because the unicorn_core.log got deleted after upgrade.

EDIT: I don't know how, or why. I tested 2.0.5 with custom capsule 2.0.5.1, I tested the same with every f*ing version from 1.2.6 upwards. Now I did a testrun and factory reset back to 1.2.6, than 2.2.5 and than 2.2.8, than I put the custom 2.2.8.1 capsule in the /Update folder and what should I say? It works now. SHH connected, root login works. -.- Nearly 2 days to get this running and now it works, like there was never a problem.

giorez
Posts: 1
Joined: Sun Aug 05, 2012 7:26 am

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by giorez » Sun Aug 05, 2012 8:40 am

I created d2network2_2.2.8.1.capsule with root access. The Lacie Network Assistant try to upload but after than is going back to 2.2.8 version, I also tryed to Manual Force uploading it on /Share/Update/d2network2_2.2.8.1.capsule. The file is just deleted and nothing happens. Any help? Any chanche to get a working d2network2_2.2.8.1.capsule?

Mijzelf
Posts: 6226
Joined: Mon Jun 16, 2008 10:45 am

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by Mijzelf » Mon Aug 13, 2012 10:45 am

The dashboard has a function to download the contents of the log directory. Cannot remember the exact naming now. There is a unicorn logfile, which should log the detection and deletion of the capsule, and also the reason why the capsule is rejected.

User avatar
cyberdog
Posts: 47
Joined: Tue Aug 24, 2010 9:20 am
Location: NANCY - FRANCE

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by cyberdog » Thu Aug 16, 2012 8:25 am

Lacie NetworkSpace 2 - rooted.
2.2.4.1

update to 2.2.8.
I create a capsule from LacieOS= OK -> 2.2.8.1
1-
try to update with Lacie Network Assistant (from mac OS X 10.8) = blocked with blue light flashing slowly
but access with FTP OK ?
Force Shutdown.
2-
try to update with Lacie Network Assistant (from Windows 7 - SP1) = blocked with blue light flashing slowly
but access with FTP OK ?
Force Shutdow
3- try FORCE UPDATE, with "Update" folder.
Unbootable.
4- Hard Reset to 1.02.
update directly to 2.2.8.1

All OK
Rooted with the second boot.
:D

vassari
Posts: 1
Joined: Wed Sep 05, 2012 12:04 am

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by vassari » Wed Sep 05, 2012 6:36 pm

Great job.

I just rooted my Network Space 2, firmware 2.2.5, running the script in Fedora 17.

Thanks!!

ltei291
Posts: 9
Joined: Mon Nov 05, 2012 12:53 pm

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by ltei291 » Mon Nov 05, 2012 12:56 pm

Hi,

I ran the v7 script on a Debian distro and the run executed with no errors. However the root user is not recognized when trying to connect to the web page.

I am using the following :
- Network Space 2
- Firmware: 2.2.8

Can somebody help me ?

Thx in advance

andreus
Posts: 134
Joined: Wed Dec 16, 2009 9:57 pm

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by andreus » Mon Nov 05, 2012 5:46 pm

Try to restart the NAS again.
Try your default user.
Try SSH access.

ltei291
Posts: 9
Joined: Mon Nov 05, 2012 12:53 pm

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by ltei291 » Tue Nov 06, 2012 10:25 am

andreus wrote:Try to restart the NAS again.
Try your default user.
Try SSH access.
I tried install again an now I am able to access the NS2 via putty using Root

Thx

N00D
Posts: 1
Joined: Sun Nov 18, 2012 1:46 pm

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by N00D » Sun Nov 18, 2012 1:55 pm

Thanks for this script Andreus. It's amazing.

Custom capsule built on Lubuntu 12.04 for Lacie D2 Network 2| Original firmware version 2.2.8 (not rooted) | Custom firmware version 2.2.8.1 (rooted) | Got root access? Yes

Thanks again for your work.

Is there a way to update transmission because there's no magnet link in it and upload seems not working :?:
Last edited by N00D on Sun Nov 18, 2012 10:18 pm, edited 1 time in total.

Capz
Posts: 2
Joined: Fri Nov 23, 2012 7:47 am

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by Capz » Wed Nov 28, 2012 6:52 am

Does anyone have a capsule I can just download and use?

hdegenaro
Posts: 2
Joined: Wed Dec 12, 2012 12:06 pm

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by hdegenaro » Wed Dec 12, 2012 1:36 pm

Hello, good morning.

I'm getting an error message when trying to update the original version 2.2.8.3 to version 2.2.8.3.1 customized .... before that, I had a customized version 2.2.3.1 ... I tried to upgrade to 2.2.8.3.1 and could not. Returned to the factory default and tried to update direct to 2.2.8.3.1 and also failed. Someone can tell why this happens?
lacie-update-error.jpg
You do not have the required permissions to view the files attached to this post.

hdegenaro
Posts: 2
Joined: Wed Dec 12, 2012 12:06 pm

Re: Create a Custom Capsule (aka Custom Firmware) [with root

Post by hdegenaro » Thu Dec 13, 2012 5:08 pm

hdegenaro wrote:Hello, good morning.

I'm getting an error message when trying to update the original version 2.2.8.3 to version 2.2.8.3.1 customized .... before that, I had a customized version 2.2.3.1 ... I tried to upgrade to 2.2.8.3.1 and could not. Returned to the factory default and tried to update direct to 2.2.8.3.1 and also failed. Someone can tell why this happens?
lacie-update-error.jpg
Hi, I managed to solve my problem with the method "force update". Restored to the factory defaults and then did update. Just after, I still had a problem with authentication via SSH. I read here on the forum that it was necessary to give more power then a boot to login. Here is a tip for those who need it.

Post Reply