Fixed -- Howto update ldlinux.sys

Please reproduce your error on a second machine before posting, and check the error by running without saved changes or extra modules (See FAQ No. 13, "How to report a bug"). For unstable Porteus versions (alpha, beta, rc) please use the relevant thread in our "Development" section.
User avatar
Rava
Contributor
Contributor
Posts: 5424
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Fixed -- Howto update ldlinux.sys

Post#1 by Rava » 26 Mar 2012, 02:25

I want to update an USB stick that got 1.0rc1 on it to 1.2rc1...

All is fine, but the issue is /boot/syslinux/ldlinux.sys
Since the md5sum differs I want to also replace the old from 1.0rc1 with the one one from 1.2rc1.

The current running 1.2rc2 sits on sda2, the stick I want to update is sdb1:

Code: Select all

root@porteus:/mnt/sda2/boot/syslinux# md5sum ldlinux.sys
b5efda848c70edd770c2f016cda4e498  ldlinux.sys

root@porteus:/mnt/sdb1/boot/syslinux# md5sum ldlinux.sys
eb0aa4ba53272e794d2d5a770653f06d  ldlinux.sys
root@porteus:/mnt/sdb1/boot/syslinux# chmod a+w ldlinux.sys
chmod: changing permissions of `ldlinux.sys': Operation not permitted
I don't want for format / erase all files cause with a 2 GB stick, there is some more stuff on it, not only Porteus...

How to change the ldlinux.sys? I cannot delete it, I cannot chmod a+w it...
Last edited by Rava on 27 Mar 2012, 07:54, edited 1 time in total.
Cheers!
Yours Rava

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5667
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: How to update ldlinux.sys ?

Post#2 by fanthom » 26 Mar 2012, 03:09

Please add [Solved] to your thread title if the solution was found.

User avatar
Rava
Contributor
Contributor
Posts: 5424
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Re: How to update ldlinux.sys ?

Post#3 by Rava » 27 Mar 2012, 07:55

@fanthom
Cannot remove ldlinux.sys

ldlinux.sys has the immutable attribute set which prevents the file from being deleted or overwritten. This is because the sector location of the file must not change or else syslinux has to be reinstalled. To remove:

Code: Select all

chattr -i /boot/syslinux/ldlinux.sys
rm /boot/syslinux/ldlinux.sys
Thanks, I also searched the web, seems my search-fu was broken that moment. Image

Anyway, quoted the solution for others to find in here :) ; checked it out and it works like a charm:

Code: Select all

root@porteus:/mnt# chattr -i /mnt/sdb1/boot/syslinux/ldlinux.sys 
root@porteus:/mnt# cp /x/boot/syslinux/ldlinux.sys /mnt/sdb1/boot/syslinux/ldlinux.sys 
cp: overwrite `/mnt/sdb1/boot/syslinux/ldlinux.sys'? y
root@porteus:/mnt# md5sum /x/boot/syslinux/ldlinux.sys /mnt/sdb1/boot/syslinux/ldlinux.sys 
b5efda848c70edd770c2f016cda4e498  /x/boot/syslinux/ldlinux.sys
b5efda848c70edd770c2f016cda4e498  /mnt/sdb1/boot/syslinux/ldlinux.sys
root@porteus:/mnt# 
( /x is a symlink always directing to my Porteus booting device; done via rc.local. :) Yes, tweaking me is lazy like that. :D :D )

Verfasst after 1 minute 16 seconds:
Re: Fixed -- Howto update ldlinux.sys
Woo Hooo! 222 posts! :Yahoo!:
Cheers!
Yours Rava

Post Reply