update-initramfs disabled (live system running on readonly)

Kernels, Network, and Services configuration
Post Reply
Message
Author
Darwish
Posts: 2
Joined: 2013-08-17 03:50

update-initramfs disabled (live system running on readonly)

#1 Post by Darwish »

Hi all,

On a Debian 6.0.7 Squeeze Live on USB -- hybrid version running in persistent mode,
ran apt-get upgrade last night and was lucky enough to catch :
update-initramfs is disabled (live system is running on read-only media).
which is what
$ update-initramfs -u
returns

I expect some problem on the next reboot if I don't fix this, am I right ?

User avatar
dilberts_left_nut
Global Moderator
Global Moderator
Posts: 5148
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 1 time
Been thanked: 4 times

Re: update-initramfs disabled (live system running on readon

#2 Post by dilberts_left_nut »

Why?
What was upgraded?
If you are running a read-only system, then it can't be upgraded (or borked - that is the point). When you reboot it is back to how it was last boot.
Unless I've misunderstood the "persistent" part - I thought it was only for the user data, but I haven't really used it either :)
AdrianTM wrote:There's no hacker in my grandma...

Darwish
Posts: 2
Joined: 2013-08-17 03:50

Re: update-initramfs disabled (live system running on readon

#3 Post by Darwish »

Because the cleaning lady dropped the water bucket in the server's room.

The system got compromised (binaries under sbin/ ran missing), perhaps after one hard reboot.
What was upgraded ? a bunch of libs, apache and the linux-image

Only the boot and the linux image are persistents.
and since the server can only be accessed through ssh, I can't tell what will happen next when the cleaning lady will turn off the switch.

fsmithred
Posts: 1872
Joined: 2008-01-02 14:52

Re: update-initramfs disabled (live system running on readon

#4 Post by fsmithred »

update-initramfs is disabled (live system is running on read-only media).
That sounds like update-initramfs recognized that you were running on live media, but it did not know that you had persistence enabled.
Only the boot and the linux image are persistents
How do you do that? In Squeeze, you can have a partition labeled 'home-rw' to make the home folder read-write, or you can label the partition 'live-rw' to make the whole system read-write. (Note - it actually creates copies of the changed system files and puts them on the read-write partition, with their full paths. It uses those copies when you boot with the word 'persistent' in the boot command.)

Or do you mean that only the boot and linux image are read-only and can't be changed? That might be something that the devs built into it deliberately, but I don't know. I've never tried to change the kernel or initrd on a live usb, so I don't know if it's possible. Maybe the boot process on a live system must get the kernel from the first partition, or something like that, so you'd never be able to boot from the upgraded kernel. Just guessin'.

Better to make your own live system if the stock version doesn't meet your needs. You can do this with live-build, which is in the debian repos, or with refracta snapshot, which is available here - http://sourceforge.net/projects/refracta/files/tools/
Live-build will build the live system to your pre-configured specifications on your installed and running system. Refracta Snapshot will copy your installed and running system to build the live system (an isohybrid image file).

Edit: You might check 'man live-boot' for options that would allow you to use a different kernel and initrd.

fsmithred
Posts: 1872
Joined: 2008-01-02 14:52

Re: update-initramfs disabled (live system running on readon

#5 Post by fsmithred »

On a live system, update-initramfs is replaced with live-update-initramfs, which is disabled when running in a live, read-only system.
/usr/sbin/update-initramfs is a symlink to /bin/live-update-initramfs
You can run the real update-initramfs by calling it with its full path:

Code: Select all

/usr/sbin/update-initramfs.orig.initramfs-tools

Post Reply