LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-04-2010, 04:35 PM   #1
lxa2xjj
LQ Newbie
 
Registered: Aug 2008
Posts: 9

Rep: Reputation: 0
debian apt-get upgrade gone bad, missing command files, /dev error?


Hello all!

I have recently attempted to upgrade two very similar debian-sarge machines. I pointed their sources.list entries at "stable". The first machine went fine without a hitch, the other seems to have grave problems.

Bottom line, A ton of critical system commands got lost/deleted. What's the best way to get them back?

The second problem is that apt-get upgrade now dies while installing/reinstalling lilo. The error is:

Warning: '/proc/partitions' does not match '/dev' directory structure.
Name change: '/dev/md/0' -> '/dev/md0'
Warning: device outside of RAID set /dev/hda 0x0300
Warning: /dev/md0 is not on the first disk
Fatal: open /vmlinuz: No such file or directory


Any suggestions on how to recover this mess?????

Yes, machine2 has the root dir on a mirrored pair of drives.

Machine1 does not have a raid array on it.

Thanks in Advance,

John


>>>>>DETAILS FOLLOW:


>>>>>Initially the second machine gave an apt-get error:


This installation run will require temporarily removing the essential package e2fsprogs due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option.
E: Internal Error, Could not early remove e2fsprogs

>>>>>I was able to get past this error, and many, many packages and files were successfully upgraded.

Now I find that the machine is partially functional, but many command and utility files are missing. A comparison of the /sbin directories of both machines shows that the second is missing the executable files:

The second machine now crashes if I re-attempt an apt-get upgrade. The error is:

E: Sub-process /usr/bin/dpkg returned an error code (1)
machine2:/sbin# apt-get upgrade
Reading Package Lists... Done
Building Dependency Tree... Done
The following packages have been kept back:
adduser analog apt apt-utils bash bind9 console-common cpp debianutils
fetchmail gcc groff-base iproute libdbd-mysql-perl libgcc1 libgd1 libgd2-xpm
libisccc0 libpam-modules libsensors3 libsnmp-perl libssl-dev libssl0.9.7
mount mysql-client mysql-server nano netbase netkit-ping ntp-simple passwd
pciutils perl-tk php4 php4-cgi php4-curl php4-dev php4-gd php4-imap
php4-ldap php4-mysql php4-pear php4-snmp php4-xslt pppoeconf snmp snmpd ssh
tasksel telnet telnetd tkmib util-linux vim whiptail
0 upgraded, 0 newly installed, 0 to remove and 55 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up lilo (22.6.1-9.3) ...
Running lilo...
Warning: '/proc/partitions' does not match '/dev' directory structure.
Name change: '/dev/md/0' -> '/dev/md0'
Warning: device outside of RAID set /dev/hda 0x0300
Warning: /dev/md0 is not on the first disk
Fatal: open /vmlinuz: No such file or directory
dpkg: error processing lilo (--configure):
subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
lilo
E: Sub-process /usr/bin/dpkg returned an error code (1)
machine2:/sbin#





>>>>> A comparison of machine1 (good upgrade) and machine2 /sbin directories shows that the following commands were some how deleted from machine2:/sbin.


badblocks
blkid
bootlogd
ctrlaltdel
debugfs
depmod
dhclient3
dhclient-script
dosfsck
dosfslabel
dumpe2fs
e2fsck
e2image
e2label
e2undo
findfs
fixfiles
fsck
fsck.cramfs
fsck.ext2
fsck.ext3
fsck.ext4
fsck.ext4dev
fsck.msdos
fsck.nfs
fsck.vfat
grub-install
halt
init
insmod
isosize
kbdrate
killall5
logsave
lsmod
mkdosfs
mke2fs
mkfs.bfs
mkfs.cramfs
mkfs.ext2
mkfs.ext3
mkfs.ext4
mkfs.ext4de
mkfs.msdos
mkfs.vfat
modinfo
modprobe
mount.ncp
mount.ncpfs
mount.nfs
mount.nfs4
nwmsg
pam_tally
poweroff
reboot
resize2fs
restorecon
rmmod
rpc.statd
setfiles
showmount
shutdown
sm-notify
startpar
sulogin
telinit
tune2fs
udevadm
udevd
udevsettle
umount.nfs
umount.nfs4
unix_update
update-grub
update-modules
vol_id
 
Old 03-04-2010, 07:34 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Bottom line, A ton of critical system commands got lost/deleted. What's the best way to get them back?
If apt is in a broken state and ther are really critical things missing from /sbin and/or /bin you can simply copy the binaries from another machine (I've had to do this before). You will then need to make sure that you reinstall the relevant packages.

Evo2.
 
Old 03-05-2010, 04:21 AM   #3
lxa2xjj
LQ Newbie
 
Registered: Aug 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by evo2 View Post
.... You will then need to make sure that you reinstall the relevant packages.

Evo2.
Thank you evo2. I have copied files from another machine and now things work better than previously.

I still can't get apt-get to work so I cant re-install the broken packages.

The error is still the same, shown below. I have verified, there is a directory/file entry of /dev/md0


I havent tried rebooting yet..... im not sure what will happen because lilo may be missing.



Any suggestions would be greatly appreciated,

-John



machine2:/dev# apt-get install --reinstall finger
Reading Package Lists... Done
Building Dependency Tree... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 55 not upgraded.
1 not fully installed or removed.
Need to get 0B/17.8kB of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 21520 files and directories currently installed.)
Preparing to replace finger 0.17-10 (using .../finger_0.17-10_i386.deb) ...
Unpacking replacement finger ...
Setting up lilo (22.6.1-9.3) ...
Running lilo...
Warning: '/proc/partitions' does not match '/dev' directory structure.
Name change: '/dev/md/0' -> '/dev/md0'
Warning: device outside of RAID set /dev/hda 0x0300
Warning: /dev/md0 is not on the first disk
Fatal: open /vmlinuz: No such file or directory
dpkg: error processing lilo (--configure):
subprocess post-installation script returned error exit status 1
Setting up finger (0.17-10) ...
Errors were encountered while processing:
lilo
E: Sub-process /usr/bin/dpkg returned an error code (1)
machine2:/dev#
 
Old 03-05-2010, 05:04 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Glad you are making progress. Can you please post the output of:
Code:
apt-get -f install
mount
cat /proc/partitions
cat /etc/fstab
(the first command will probably just output much the same as "apt-get install --reinstall finger)

Cheers,

Evo2.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get dpkg error: files list file ... missing final newline PBSchmidt Debian 13 04-29-2023 05:55 PM
Error with apt, on any command; update, upgrade, install etc Brian5 Ubuntu 2 11-27-2007 11:52 PM
/dev/audio, /dev/dsp and /dev/mixer missing in Debian Etch 1337_penguin Debian 2 04-11-2007 11:33 AM
/dev/eth0 missing after apt-get upgrade takin Linux - Wireless Networking 1 11-22-2005 04:07 AM
debian apt-get upgrade error strattonbrazil Debian 4 11-17-2005 06:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration