Page 1 of 7 123 ... LastLast
Results 1 to 10 of 67

Thread: Root is Nearly Full - in LiveUSB Mode to Delete old Kernels

  1. #1
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Root is Nearly Full - in LiveUSB Mode to Delete old Kernels

    I don't have the GRUB Recovery Screen due to a video card exchange. I asked for help about fixing that over a year ago, but have never had a response.

    This 12.04 LTS hangs at boot time. I've spent the last 3 days on LiveUSB mode trying to fix it. It's come down to this:

    I saw the number of old kernels a few days ago and started deleting about half of them. I was very very careful to not delete my

    3.2.0.36-generic-pae ( or very close to those numbers I cannot recall the numbers, exactly).

    or any with matching those numbers.

    After those 20 or so old kernels were manually deleted, the OS would no longer boot. So here I am in LiveUSB and need help in deleting the out-of-date kernels. I could not perform that in boot-repair-disk session; even though it said I should. Maybe I'm not familiar with how it operates. It's my first use of it. Meanwhile in Boot-Repair-Disk the number of old kernels looked to be around 50, even though I though I manually deleted about half of them. And in another section of the Boot-Repair-Disk, under the heading GRUB, the old kernels were still there, too. I cannot post the RESULTS.txt as this forum says 49Kb is too large.

    Can you explain how I can mount the hard-drive and somehow delete the old kernels and then start working on repairing GRUB2?

    Also, please tell me the name of the folder (directory) where all the kernles are kept. For example: is that / OR /Boot or Bin -- with / being root, obviously?

    I found a command line tutorial about removing old kernels with one line here:

    http://tuxtweaks.com/2010/10/remove-...h-one-command/
    Last edited by Mark_in_Hollywood; January 26th, 2013 at 06:51 PM.
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 1T SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  2. #2
    prodigy_ is offline May the Ubuntu Be With You!
    Join Date
    Mar 2008
    Beans
    1,219

    Re: Root is Nearly Full - in LiveUSB Mode to Delete old Kernels

    I'd suggest reinstalling on a bigger partition. Removing old kernels can yield some space but almost certainly not enough in the long run.

    But if you really need to fix this installation, try to reinstall Grub (via chroot): https://help.ubuntu.com/community/Gr...ing#via_ChRoot This should help unless you've deleted ALL kernels.

  3. #3
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Root is Nearly Full - in LiveUSB Mode to Delete old Kernels

    Quote Originally Posted by prodigy_ View Post
    I'd suggest reinstalling on a bigger partition. Removing old kernels can yield some space but almost certainly not enough in the long run.

    But if you really need to fix this installation, try to reinstall Grub (via chroot): https://help.ubuntu.com/community/Gr...ing#via_ChRoot This should help unless you've deleted ALL kernels.
    My / (root partition) is about 16 gig. It's 14.5 gig full. Boot-Repair-Disk says delete them, as that fullness is preventing a boot. My /home is on a separate partiton. /sda3 and sda5 respectively.

    I don't understand what you mean by: "But if you really need to fix this installation" - Please explain, briefly if possible, how a GRUB reinstall will fix the problem, but removing the old kernels won't? My theory here is: less is more.
    Last edited by Mark_in_Hollywood; January 26th, 2013 at 08:53 PM.
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 1T SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  4. #4
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Root is Nearly Full - in LiveUSB Mode to Delete old Kernels

    If no error reported then /boot/grub is NOT mounted?

    ubuntu@ubuntu:~$ sudo grub-install --boot-directory=/mnt/boot /dev/sda
    Installation finished. No error reported.

    ubuntu@ubuntu:~$ sudo chroot /mnt

    root@ubuntu:/# grub-install --recheck /dev/sda

    /usr/sbin/grub-probe: error: cannot find a device for /boot/grub (is /dev mounted?).
    Last edited by Mark_in_Hollywood; January 26th, 2013 at 10:55 PM. Reason: clarity
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 1T SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  5. #5
    Join Date
    Apr 2011
    Location
    Victoria/Vancouver, BC
    Beans
    96
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Root is Nearly Full - in LiveUSB Mode to Delete old Kernels

    Just some precursory investigations here, please copy paste the output for

    Code:
    dpkg -l | grep linux-image

    Code:
    uname -a

  6. #6
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Root is Nearly Full - in LiveUSB Mode to Delete old Kernels

    I'm not adept at this, but I believe this information is the LiveUSB filesystem and NOT my hard-disk (real) kernel. I'm more likely to be wrong than right, here, but I'm just double-checking.

    ubuntu@ubuntu:~$ dpkg -l | grep linux-image
    ii linux-image-3.2.0-23-generic-pae 3.2.0-23.36 Linux kernel image for version 3.2.0 on 64 bit x86 SMP
    ii linux-image-generic-pae 3.2.0.23.25 Generic Linux kernel image
    ubuntu@ubuntu:~$ uname -r
    3.2.0-23-generic-pae
    ubuntu@ubuntu:~$
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 1T SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  7. #7
    prodigy_ is offline May the Ubuntu Be With You!
    Join Date
    Mar 2008
    Beans
    1,219

    Re: Root is Nearly Full - in LiveUSB Mode to Delete old Kernels

    Quote Originally Posted by Mark_in_Hollywood View Post
    Please explain, briefly if possible, how a GRUB reinstall will fix the problem, but removing the old kernels won't? My theory here is: less is more.
    Hm. If I understand correctly, the problem is that your Ubuntu no longer boots after some kernel cleanup. That's what you can fix with with the update-grub command (while chrooted into your installation as described in the HOWTO I linked).

    And if you actually can boot into your installation, just use the one-liner from your OP. It'll do the job (remove old kernels) for you.
    Last edited by prodigy_; January 27th, 2013 at 12:43 AM.

  8. #8
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Root is Nearly Full - in LiveUSB Mode to Delete old Kernels

    I want to do a little more than merely remove the old kernels. Some 18 months ago, my video card (EVGA 9500GT) was RMA'd to EVGA for a defect. During that time, I used the on-board video. That caused a GRUB resolution problem, with, if I'm recalling correctly, the GRUB boot time lines either scrolling off screen (right side) or some other problem. I got some help to reset the GRUB resolution or boot-time screen resolution. After re-installing the new vid card, GRUB had no video at any other screen that the selectable options, to wit: Ubuntu, Memory Test, and Windows 7. Trying Recover (or Rescue) or whatever it is called blanks the screen. I posted to IRC#GRUB (or some such) and posted about that problem, this Forum at that time, but never received an answer.

    So what I want to accomplish in LiveUSB is to purge and re-install GRUB and all it's associated files, in hopes of restoring proper working order GRUB boot-time and then I'll remove the old kernels.
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 1T SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

  9. #9
    Join Date
    Apr 2011
    Location
    Victoria/Vancouver, BC
    Beans
    96
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Root is Nearly Full - in LiveUSB Mode to Delete old Kernels

    http://askubuntu.com/questions/28099...ng-all-kernels

    Perhaps the top comment in the link + the grub-install you wish to do. But the mounting in this post makes sense prior to chrooting in.

  10. #10
    Join Date
    Mar 2006
    Location
    Rumplestiltskin, Cal.
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Root is Nearly Full - in LiveUSB Mode to Delete old Kernels

    Per the post at AskUbuntu.com I did in a terminal via cut and paste, only:

    Boot into a live CD (or live USB), mount some systems, chroot into it and install the kernel. After a successful installation of the kernel, unmount the filesystems.

    Open Terminal
    Mount the Ubuntu partition: sudo mount /dev/sdXY /mnt

    Mount some special partitions:

    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys /mnt/sys

    Chroot into the /mnt: sudo chroot /mnt
    Install the Linux kernel: apt-get install linux-image-generic (no sudo required as you are root after a chroot)

    After a successful installation of the kernel, get out the chroot and unmount some filesystems:

    exit
    sudo umount /mnt/sys
    sudo umount /mnt/proc
    sudo umount /mnt/dev
    sudo umount /mnt

    Reboot and remove CD or USB: sudo reboot

    apt-get reported that current (or latest) kernel is installed.

    on reboot it hangs after about 10 to 15 seconds. It seems like the same place every time, but I can't be certain of that.

    =========

    I next again tried:

    ubuntu@ubuntu:~$ sudo mount /dev/sda3 /mnt/boot

    ubuntu@ubuntu:~$ sudo chroot /mnt
    chroot: failed to run command `/bin/bash': No such file or directory

    =========

    and I tried:


    ubuntu@ubuntu:~$ sudo chroot /mnt/boot
    root@ubuntu:/# update-grub
    /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
    Last edited by Mark_in_Hollywood; January 27th, 2013 at 08:49 PM.
    AMD Athlon II X4 620, 4gig ddr2-800, m/b MSI K9N6PGM2, 1T SATA, EVGA 9500GT, Brother MFC-240C prntr, LG DVD-rom GSA-H55N

Page 1 of 7 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •