Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
spockOffline
19 Post subject: mkinitramfs hangs during DU  PostPosted: 27.04.2014, 21:17



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
While doing a DU today on my girlfriend's i386 machine, I noticed that sysvinit-core was to be removed. Knowing that this may be quite critical, I checked out what else was going on, and I think systemd was to be installed instead. After checking the forums here and finding no warnings, I foolishly took the plunge with the upgrade, assuming that all would be well now that Debian has decided to migrate to systemd (I read about that on Debian Project News).

Well it seems something has gone badly wrong. During DU I saw dpkg warn of dependency problems but that sysvinit-core is to be removed anyway as requested (I've seen this happen before many times with other packages, always without incident). I pressed Scroll Lock to read this bit, and then released Scroll Lock to continue. The DU now seems to just hang when update-initramfs tries to mkinitramfs 3.14-1.slh.1-aptosid-686 (which is the currently running kernel). Even pressing CTRL+C doesn't terminate the process, and I have to open another virtual terminal and manually kill all the processes that dpkg has spawned. (These include 3 cryptroot processes, in case that is of interest; I can report ps aux output if it helps.) I know this is probably dangerous, but there is clearly nothing going on - the machine has stopped, so I needed to try and do something.

I don't know how to proceed. Trying to DU again tells me:

      Code:
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.


When I do that, it says:

      Code:
Setting up initramfs-tools (0.115) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.115) ...
update-initramfs: Generating /boot/initrd.img-3.14-1.slh.1-aptosid-686


And there it hangs (for 8 hours today while I went out). I even manually removed that initrd.img-3.14-1.slh.1 in the hope that it might get past the problem and reinstall it later, but then the DU just hangs here instead:

      Code:
Setting up initramfs-tools (0.115) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.115) ...
update-initramfs: Generating /boot/initrd.img-3.14-0.slh.2-aptosid-686


The current state of play mid-upgrade is:
systemd = installed
sysvinit = installed
sysvinit-core = not installed

The machine is nothing fancy, an ancient Pentium 4 running KDE-lite on a 128GB Samsung 830 SSD with a 2TB HDD for data files. infobash fails to run saying "dependency not met: runlevel not found in path". There are no encrypted partitions, LVM, VM, etc., just vanilla ext4 on both / and /data partitions on the two drives. I'm not able to go home and check if this also happens on my own amd64 and (identical) i386 boxen.

I hope someone can help me - I'm sitting here by the machine which I dare not reboot or power down, posting this on an icky Windows laptop, for a few hours until I fall into sleep's clutches...
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
slhOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 28.04.2014, 02:14



Joined: 2010-08-25
Posts: 746

Status: Offline
While the debian developers are working hard on making systemd fit for taking over as default, the actual switch hasn't happened yet - anything forcefully pulling in systemd at this point in time would still be considered to be a bug (this will change soon, but hasn't yet). initramfs-tools probably fails because it can't find init, so you need to supply one - either systemd-sysv (is that installed?) or sysvinit-core.


At this moment -especially if you didn't reboot yet- I'd try to reinstall sysvinit-core, rather than migrating to systemd (libsystemd* is fine, systemd* shouldn't be needed yet). If this fails to work, but only then, you can try to install systemd-sysv instead.

(That said, there's nothing wrong with systemd and the migration should succeed without major hickups, but given that you are encountering problems right now, I'd try to revert to te known-working setup using sysvinit-core.)
 
 View user's profile Send private message  
Reply with quote Back to top
spockOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 28.04.2014, 11:09



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
Thanks for your speedy help Smile

For some reason sysvinit-core was nowhere to be found even in /var/cache/apt/archives (although I've not removed it myself), and the systemd upgrade seemed partially done so my first thought was to try:
      Code:
dpkg -i /var/cache/apt/archives/systemd-sysv_204-9_i386.deb
This brought up lots of dependency problems, with various systemd packages all looking for specific but conflicting versions 204-9, 204-10, 204-11. That doesn't bode well! Confused

So next, using this laptop I swam through the pool directory of my Debian mirror to find the URL of the sysvinit-core i386 package, and used wget on the borken machine to manually grab the .deb file to install using dpkg. This complained that:
      Code:
# cd /var/cache/apt/archives
# ls sysvinit-core*
ls: cannot access sysvinit-core*: No such file or directory
# wget http://www.mirrorservice.org/[...]/pool/main/s/sysvinit/sysvinit-core_2.88dsf-55_i386.deb
# dpkg -i sysvinit-core_2.88dsf-55_i386.deb
[...]
systemd-sysv (204-9) breaks sysvinit-core and is installed.
so it leaves it unconfigured. After reading dpkg --force-help, I then tried:
      Code:
dpkg -i --force-breaks sysvinit-core_2.88dsf-55_i386.deb
Reading database [...]
Preparing to unpack sysvinit-core_2.88dsf-55_i386.deb ...
Unpacking sysvinit-core (2.88dsf-55) over (2,88dsf-55) ...
Replaced by files ininstalled package systemd-sysv (204-9) ...
dpkg: sysvinit-core: dependency problems, but configuring anyway as you requested:
 systemd-sysv (204-9) breaks sysvinit-core and is installed.

Setting up sysvinit-core (2.88dsf-55) ...
sysvinit: restarting...Couldn't find an alternative telinit implementation to spawn.
.Couldn't find an alternative telinit implementation to spawn.
.Couldn't find an alternative telinit implementation to spawn.
.Couldn't find an alternative telinit implementation to spawn.
.Couldn't find an alternative telinit implementation to spawn.
.Couldn't find an alternative telinit implementation to spawn.
.Couldn't find an alternative telinit implementation to spawn.
.Couldn't find an alternative telinit implementation to spawn.
 failed.
Processing triggers for man-db (2.6.7.1-1) ...

What should I try next? I don't know if apt is still broken or if the above will allow it to work again, otherwise I have to manually (de-)install packages with dpkg, but thought I should check with you first before trying any of my crazy novice ideas or DU'ing again. I'm here until 5pm GMT but then have to leave until possibly next week, but will leave the machine on all week if need be.

The scary thing is wondering what triggered systemd to even get installed yet in the first place before it's fully baked. Is there any way to find out what package pulled it in? I've looked at (and archived) the dpkg and apt logs but can't find anything, although my lack of knowledge isn't helping... Embarassed Confused


Last edited by spock on 28.04.2014, 22:44; edited 2 times in total
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
spockOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 28.04.2014, 11:11



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
{Please excuse the odd typo - all the above was typed by hand...!Embarassed)
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
finottiOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 28.04.2014, 13:34



Joined: 2010-09-12
Posts: 315

Status: Offline
Wild guess (and it might be too late): did you try "apt-get -f install" or "apt-get -f dist-upgrade"?
 
 View user's profile Send private message  
Reply with quote Back to top
spockOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 28.04.2014, 15:31



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
Thanks for your help, finotti Smile I had thought of doing something like that, but trying it now gives:
      Code:
# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libpam-systemd libsystemd-daemon0 libsystemd-journal0 libsystemd-login0 systemd systemd-sysv
Suggested packages:
  systemd-ui
The following packages will be REMOVED:
  sysvinit-core
The following packages will be upgraded:
  libpam-systemd libsystemd-daemon0 libsystemd-journal0 libsystemd-login0 systemd systemd-sysv
That sounds dangerous considering slh said systemd isn't ready even for sid yet! I'd rather not be the first early adopter, before even DD's! Wink

If I try your second suggestion to force the DU, it does the above and many more upgrades as expected, including kernel 3.14-1.slh.2 but I fear that the first instance of trying to mkinitramfs may just fail and hang again as before, unless apt knows how to fix that first (it may well do as it's usually amazingly clever at such things). So I daren't try it unless someone can assure me it's a safe course of action.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
slhOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 28.04.2014, 18:38



Joined: 2010-08-25
Posts: 746

Status: Offline
systemd works and is ready for sid, but it's not yet the default in sid or Debian as a whole. In this situation you should go with the least invasive approach, relative to your current system state, and do as little changes as possible,

I suggest to go with sysvinit-core at this moment, that doesn't imply there'd be anything wrong with systemd - you just need one (functional) provider of /sbin/init.
 
 View user's profile Send private message  
Reply with quote Back to top
spockOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 28.04.2014, 22:39



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
Sorry, I just realised my 2nd post above wasn't very clear, so I just edited it to add the bolded word sysvinit-core and a full description in the 2nd code box of how I already tried to install sysvinit-core, which failed. Can anyone suggest how to get sysvinit-core back and working again? I guess it will possibly involve first removing systemd. But the init system is currently broken, and possibly apt too, which is why I'm using dpkg manually instead.

Tonight I had to come back to my own house, so I've had to leave the broken machine switched on and in init 3, so my girlfriend has no X for the rest of the week Sad I showed her this very forum in lynx and elinks, and she was impressed that they worked, but let's just say that neither would be her chosen browser... Wink

I did try to at least restart KDE for her by typing init 5, but it gave a scary error (I forget now exactly what) something about telinit being missing, like above. Even if it had have worked, it's probably unwise to do this with the system in such a fragile state.

If anyone has any bright ideas I could phone her and tell her what to type to rescue the machine and resume the DU so she can reboot and be a happy bunny Smile

Or perhaps she should risk it and go ahead and apt-get -f install, and possibly be the first girl running systemd on Debian! Cool Very Happy
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
slhOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 28.04.2014, 23:02



Joined: 2010-08-25
Posts: 746

Status: Offline
You definately need to make apt happy first, once the dependency conflict is resolved (which includes putting back one supported init, be it sysvinit-core, upstart (not recommended at all) or systemd is just a details).
 
 View user's profile Send private message  
Reply with quote Back to top
spockOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 28.04.2014, 23:15



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
Yes, I always aim to keep apt happy Smile Would apt-get -f install be a way to do that?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
spockOffline
Post subject:   PostPosted: 28.04.2014, 23:58



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
(Editing in hindsight: IGNORE THIS POST, as I misunderstood)

I've just looked at my own office machine (which is the same i386 hardware as my girlfriend's, albeit with more packages and fluxbox+XFCE instead of KDE), and now I'm really puzzled.Confused My machine already has systemd (version 204-8 ) automatically installed, along with all its libraries, all seeming to co-exist happily with sysvinit-core and sysvinit (albeit an earlier version 2.88dsf-53, not -55 as above).

After running apt-get update, my machine now wants to upgrade systemd et al but isn't removing anything like hers did, nor is sysvinit to be upgraded. How can this be?

And looking at my amd64 studio machine, it's different again: it doesn't have systemd currently installed, yet it does have all the libsystemd-* libraries (which it seems were automatically installed a while back). Running apt-get update and proposing (but declining) a DU on that box wants to upgrade the libsystemd-* libraries but still doesn't add systemd itself nor removes any sysvinit packages.

I shall hold off all DU for now.


Last edited by spock on 05.05.2014, 18:21; edited 1 time in total
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
slhOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 29.04.2014, 01:09



Joined: 2010-08-25
Posts: 746

Status: Offline
The "systemd" package itself is (by default) passive and doesn't provide /sbin/init itself, for it to take action, you need to explicitly enable it (by providing init=/bin/systemd via the kernel's cmdline). Accordingly only "systemd-sysv" actually toggles the default, by conflicting with "sysvinit-core" and providing /sbin/init on its own.

The libraries, ^libsystemd*, are by now required by many packages and are harmless, "systemd" itself as well (as long as you don't explicitly make it take over init=) - only systemd-sysv actually replaces the default. However at this very moment, nothing in Debian (which isn't a dedicated tool to manipulate systemd settings) is supposed to depend on the "systemd" package (this will change soon, but shouldn't have changed yet).
 
 View user's profile Send private message  
Reply with quote Back to top
spockOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 29.04.2014, 08:22



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
Hi slh, thanks for your informative answer. That makes sense then about my own machines.

I asked my girlfriend to type apt-get -f install, which chugged along OK installing all the systemd packages:
      Code:
# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  libpam-systemd libsystemd-daemon0 libsystemd-journal0 libsystemd-login0 systemd systemd-sysv
Suggested packages:
  systemd-ui
The following packages will be REMOVED:
  sysvinit-core
The following packages will be upgraded:
  libpam-systemd libsystemd-daemon0 libsystemd-journal0 libsystemd-login0 systemd systemd-sysv
...until it hung again while trying to update-initramfs just like it did in my first post:
      Code:
Setting up initramfs-tools (0.115) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.115) ...
update-initramfs: Generating /boot/initrd.img-3.14-0.slh.2-aptosid-686
And there it hangs. Pressing CTRL+C does nothing, only killing the process from another VT restores control.

How can I fix the broken init? Even running mkinitramfs myself hangs in the same way, so the higher level tools such as update-initramfs and apt are never going to fly until the fundamental problem is resolved. I see there are packages like init-select to decide which init system to use. I don't care which one we have, so long as it works. But I don't really understand much about this so don't know what to do.

Weirdly though, systemd-sysv was somehow automatically installed on her machine. It's even stranger that none of my other machines have the same issue. I'm guessing that unless nobody else here sees the same problem, then it might be a unique fault to this machine, but it still seems like a bug as something has caused it.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
slhOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 29.04.2014, 11:39



Joined: 2010-08-25
Posts: 746

Status: Offline
In general, systemd and systemd-sysv are working, but the migration is certainly not the potentially least invasive thing to do (which doesn't imply that the systemd migration itself is the trigger for the problems you're reporting, but it's easier to get that out of the way first) - that's why I've suggested to stick to sysvinit-core for now (because, unless anyone of you explicitly reconfigured the system to use systemd, sysvinit-core was the default before doing the botched dist-upgrade).

So to stick with the simple approaches. Try to go back to sysvinit-core, an explicit "apt-get install --purge sysvinit sysvinit-core" might already help, eventually the list of packages might need further refinement to hint apt to doing the right thing. After that, you can try to "apt-get remove --purge systemd systemd-sysv". Both of these steps might take out the packages which (erroneously) pulled in systemd, so take a bit of caution.
 
 View user's profile Send private message  
Reply with quote Back to top
spockOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 30.04.2014, 11:31



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
Thanks again for your patient help! I phoned Chrissie to issue the commands (she's learning fast!Smile) But we're going round in circles here, and what you've suggested still fails as before.

Typing either "apt-get install --purge sysvinit sysvinit-core" or "apt-get remove --purge systemd systemd-sysv" just gives this error, as described in the first post:
      Code:
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

When she does that, it still does the same as in the first post, i.e.:
      Code:
Setting up initramfs-tools (0.115) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.115) ...
update-initramfs: Generating /boot/initrd.img-3.14-0.slh.2-aptosid-686

And there it hangs again. If she runs ps aux in another VT, she can see "dpkg --configure -a" along with the 3 cryptroot processes just the same as before.

So I guess we need to fix whatever is causing mkinitramfs to hang. Any ideas how to do this?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio