Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
slhOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 30.04.2014, 17:02



Joined: 2010-08-25
Posts: 746

Status: Offline
If you don't need cryptroot (no encrypted partitions), then just remove it.
 
 View user's profile Send private message  
Reply with quote Back to top
spockOffline
Post subject: RE: mkinitramfs hangs during DU  PostPosted: 03.05.2014, 21:32



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
Sorry for the delay - I've been ill with a nasty virus (medical not computer!)Smile

The trouble is, whatever command we run, either dpkg [something] or apt-get [something], it complains the same error:
      Code:
E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem.

When we do that, or either of finotti's suggestions, it goes through the same update-initramfs procedure which hangs with mkinitramfs.

So dpkg needs fixing before we can even proceed to install, upgrade or remove any packages.

Is there a manual override way to go into dpkg's brain and surgically remove bits of post-install/rm scripts that keep failing? I can use a text editor. I've tried "rm /var/lib/dpkg/lock", which removes the lock file, but dpkg still complains that it was interrupted.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
spockOffline
Post subject:   PostPosted: 04.05.2014, 14:10



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
YAY, posting from the broken machine using elinks text-mode browser Smile

OK, I've spent all day reading up about this. Googling for the "you must run dpkg --configure -a" error message only brought up lots of unrelated issues. But reading "man dpkg" inspired me to try these commands, which worked:
      Code:
dpkg --force-depends -r systemd-sysv
cd /var/cache/apt/archives/
dpkg -i sysvinit-core_2.88dsf-55_i386.dsb

They all seemed to proceed fine, so that may have fixed the weird unexplained installation of systemd-sysv, and got us back to using sysvinit.

But we still have the hanging mkinitramfs any time it is invoked, Typing "dpkg --audit" lists initramfs-tools as being unconfigured. Trying to configure it just runs mkinitramfs and hangs...
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
spockOffline
Post subject:   PostPosted: 04.05.2014, 16:27



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
OK, now we are getting somewhere! Smile

Going by slh's suggestion, I couldn't find a package called cryptroot, but from searching packages, I guessed it's part of cryptsetup, which was installed. So I typed "dpkg -r cryptsetup" which removed it successfully. Progress at last Smile This allowed me to dpkg --configure initramfs-tools successfully without mkinitramfs hanging. Great! So now apt and dpkg worked as normal again.

But a simulated DU still wanted to install systemd-sysv and remove sysvinit-core. So instead of that, I tried "apt-get -s install sysvinit-core", which mentioned:
      Code:
libpam-systemd : Depends: systemd-sysv [...] or systemd-shim

So I installed systemd-shim and that stopped apt wanting to replace sysvinit-core with systemd-sysv.

Now a DU proceeds as normal, until after setting up packages it does:
      Code:
Generating grub configuration file ...
Found linux image [...]
Found [lots more linux images]
Found memtest86+ image
Found memtest86+ multiboot image
And there it hangs again.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
spockOffline
Post subject:   PostPosted: 04.05.2014, 19:02



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
OK, using ps aux to see what's going on when it hangs, I've narrowed it down to this command, which also hangs if I invoke it manually:
      Code:
grub-mkconfig -o /boot/grub/grub.cfg
It finds all the kernel images and memtest images, but then just stops at the end. Pressing CTRL+C actually restores control to the terminal, but spews out these errors:
      Code:
grep: /tmp/os-prober.U2dRC8/swaps-map: No such file or directory
grep: /tmp/os-prober.U2dRC8/mounted-map: No such file or directory
grep: /tmp/os-prober.U2dRC8/raided-map: No such file or directory
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
spockOffline
Post subject:   PostPosted: 04.05.2014, 20:04



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
I'm also seeing lots of LVM processes in ps aux, multiple vgs and lvs processes which are unkillable even with kill -9 as root. I've never used LVM, so tried:
      Code:
dpkg -r lvm2
(Reading database ... 428668 files and directories currently installed.)
Removing lvm2 (2.02.105-2) ...
But that just hangs there.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
spockOffline
Post subject:   PostPosted: 04.05.2014, 20:47



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
dpkg --audit now says that lvm2 and linux-image-3.14-1.slh.2 are only half-configured, as both keep hanging before they finish. I'm able to DU, but yet again it hangs at the same place, after update-initramfs finds the memtest images.

Why do they hang? What else can I try?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
vinurOffline
Post subject:   PostPosted: 04.05.2014, 21:36



Joined: 2010-09-11
Posts: 60
Location: Lake Oswego
Status: Offline
Hello Spock,
Did I understand that this is P4 - 386 machine. Late 1990's or early 2000's
A couple of questions for your consideration.
How old is the hard drive?
If it is as old as I think, can you buy a new one?

I suggest that, if I am interpreting this well...
Get a new bigger drive, Remake the machine from scratch with both drives present.
Copy the important files from the old home folder once the new drive is boot-able with the new aptosid system installed to the new drive.

It really sound like desperation to keep beating this old horse...

I read your attempts to save it...
A long time ago... about a year, I finally decided to let my 5.25 floppy’s Rest in Peace, as even then, they lived well past any reasonable use...
How old is the motherboard... did you know that modern lead free solders used on motherboards crystallize and get resistive while growing "whiskers" (solder jumps make certain components generate errors).
If it was made after 2004 and is older that 4-5 years... it may be motherboard related...
Just a thought for your consideration... I do not think it is entirely software related problems developing and it will only get worse, fast, if it is hardware.
If you are considering making a new computer... give AMD processors a serious look, I use to work at Intel MD6 Jones Farm, Hillsboro, OR in the Microprocessor lab - Pentium Pro days and P4 1997ish
Intel makes fine processors... but the new AMD products are less expensive and frankly run 64 bit aptosid Linux great.
Just a though.
P4 are Jurassic history.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
spockOffline
Post subject:   PostPosted: 04.05.2014, 23:56



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
Hi vinur, yes this is an ancient 12?-year old 2.9GHz processor+motherboard with 2GB RAM, but I upgraded it and installed aptosid on a fairly new 128GB Samsung 830 SSD 2 years ago, using a then new Hitachi 2TB HDD for data. So have no fear, no antique 1GB HDD! Smile

It runs fine and stable (not gaming obviously), and still goes through an entire DU, updating hundreds of packages, playing music, writing this post (in text mode!), etc. I think that if there were issues with either the SSD or HDD they would be obvious in other ways.

I have an older machine, a Pentium IV 1.6GHz, whose onboard Intel graphics became too flaky to run X a few years ago, so that machine became a backup+music+email box in text mode, a task which it still enjoys in daily use. My other office machine is (bizarrely) the very same model as my girlfriend's broken computer that we're discussing here, upgraded to aptosid with the same spec RAM+SSD+HDD. That machine certainly is having hardware issues: graphic crashes and hard-lockups for the past few months; a tale for another thread...

I wonder if there's any way to compare/share files from the two nearly-identical boxes (although they are 20 miles apart, and I'm no ssh wizard) in order to restore this one?

And yes, I know what you're saying about AMD. My music studio box is a 6-core AMD Phenom with 16GB RAM and a Radeon 5750, and that system is lovely.

It's not obsessive desperation that keeps me flogging this dead horse, but poverty - we are poor self-employed artists and buying a new computer (even with today's cheap hardware) is an extra expense we don't need, especially when it seems to be running fine, just with a case of the gremlins.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
slhOffline
Post subject:   PostPosted: 05.05.2014, 00:37



Joined: 2010-08-25
Posts: 746

Status: Offline
The reported problems don't really sounds like hardware failure, rather that 'something' has upset the current software installation.

Please try to avoid using dpkg as much as possible here, dpkg itself won't do proper dependency resolution for you and instead requires you to provide a perfect solution. In contrast using apt takes care of recursive depenedency resolution for both installing and removing packages - almost completely avoiding the need of forcing anything (--force of any kind pretty much voids the warranty…). If you don't need lvm2 (you'd know if you do), you can "apt purge lvm2" and probably mdadm as well. If aptosid is your only installed operating system, in other words if you don't expect aptosid to list co-installed operating systems, you can also purge os-prober (I wouldn't be surprised if its detection heuristics for other operating systems might fall over weird fs/ partition signatures on your disk). Fixing the problem is likely simple, but it's hard to give advice for issues like these without actually seeing the breakage and being able to debug it closer. Chances that this issue repeats on a fresh installation and subsequent dist-upgrading are low as well (at least that did just work fine in a quick kvm virtual machine test), while I'm not suggesting to do that yet, it's definately worth testing before replacing any hardware.

Talking about hardware in general, if a system is regularly running for more than ~3 hours a day, it does make sense to consider replacing it on the basis of its power draw alone. Systems of 2002-2006/7 vintage easily draw about 130-150 watts idle, while modern systems have a much more dynamic power profile starting around 20 watts idle (and modern systems are idle most of the time, even during normal system use). If you choose your components properly among standard consumer parts, you can even reduce idle power usage below 10 watts for a top performance system - of course, it will need more under high load, but high load isn't the predominant system state for anything but video transcoding workstations, buildd farms, high-end gaming systems or HPC clusters.
 
 View user's profile Send private message  
Reply with quote Back to top
spockOffline
Post subject:   PostPosted: 05.05.2014, 00:39



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
Oh and thanks again vinur - I guess my older machine's 1.6GHz P4 processor must date from round about 1997, so it may even have been you that made it! Smile
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
spockOffline
Post subject:   PostPosted: 05.05.2014, 02:04



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
Damn! I got logged out of the forum and lost an entire post typed in elinks browser Sad Let's try again...

Thanks for getting back to me, slh. Your posts are getting us closer to a solution. Chrissie the other day said she could never go back to Windows Smile So I've gladly just run "apt purge os-prober". That finally let grub-mkconfig work correctly, so update-initramfs was able to complete and get past the memtest lines, which is the first time since this thread began! Smile

But still "apt purge lvm2" hangs. After killing the processes, I was able to "apt purge mdadm" too, and let it proceed to try and carry on by purging lvm2, which of course, hung again.

What's scary is that ps aux lists about 30 lvs processes, about 15 vgs processes and about 10 vgcfgbackup processes; these have all mounted up each time I've got a bit further in the DU. I was previously able to kill the os-prober processes that remained dormant, but these (all LVM processes for manipulating volume groups) are unkillable even by root using "kill -9 xxxxx".


Last edited by spock on 05.05.2014, 02:22; edited 1 time in total
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
spockOffline
Post subject:   PostPosted: 05.05.2014, 02:15



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
OK, here's an example of ps aux output, retyped by hand:
      Code:
root       421  0.0  0.0   7292 2048 tty2     D    May04   0:00 lvs --noheadings --separator : -o vg_name,lv_name
Some of them have ? instead of tty2, or other terminals.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
spockOffline
Post subject:   PostPosted: 05.05.2014, 02:20



Joined: 2010-09-11
Posts: 80
Location: Near Milton Keynes, UK
Status: Offline
There are also a few cryptic sed processes that end in "/dev/mapper/\1-\2|" if that's significant.

And the SSD is GPT formatted (but not the HDD) because that was "the way" to format drives to ensure proper alignment to sector boundaries. (I believe it may be possible nowadays to do proper alignment with other tools too.) But some programs (even fdisk) still bork at GPT partitions, so maybe that is what's going on here?
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
slhOffline
Post subject:   PostPosted: 05.05.2014, 03:42



Joined: 2010-08-25
Posts: 746

Status: Offline
If "apt-get install -f", "apt-get update && apt-get dist-upgrade" and "dpkg --configure -a" are now happy with your system - and you have either sysvinit-core or systemd-sysv installed, you can try rebooting carefully. If apt/ dpkg are happy (your previous use of dpkg --force might not guarantee that though), you 'should' have a functional initramfs image and /sbin/init available and the stalling lvm2 processes will be killed during the reboot.

Do keep the last aptosid Live ISO, either on CD/ DVD or a bootable USB stick (if you can, test it on another system first) handy, in case the reboot doesn't succeed. If it does, purge lvm2 after the reboot.

(My guess for the reason of your problems is not actually systemd, although its installation might have facilitated pre-existing issues, but stale RAID/ lvm2 etc. signatures hiding on one of your drives, which devmapper then stumbled upon (systemd uses a different method to invoke lvm2/ mdadm/ devmapper than sysvinit, so it might pick a different set of bugs) and got confused between previous filesystems and the currently used ones.)
 
 View user's profile Send private message  
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