Venture Surplus ad

Linux Help Please

The #1 community for Gun Owners in Texas

Member Benefits:

  • Fewer Ads!
  • Discuss all aspects of firearm ownership
  • Discuss anti-gun legislation
  • Buy, sell, and trade in the classified section
  • Chat with Local gun shops, ranges, trainers & other businesses
  • Discover free outdoor shooting areas
  • View up to date on firearm-related events
  • Share photos & video with other members
  • ...and so much more!
  • Davetex

    TGT Addict
    Rating - 100%
    6   0   0
    Mar 27, 2010
    8,456
    96
    Greers Ferry Lake
    Laptop has Ubuntu 14.04. I need help clearing out the boot folder so I can get updates. My nephew has always done this for me, but he's not around. I've tried some videos on YouTube but they haven't helped. Can anyone provide the command lines to delete old image files please. Thanks!!!!
    Texas SOT
     

    Brains

    One of the idiots
    Rating - 100%
    3   0   0
    Apr 9, 2013
    6,923
    96
    Spring
    Ah let me guess /boot is full. Happens all the time, here's my fix that pretty well ensures you don't booger it up. Open a terminal and follow these commands:

    1. sudo cp -R /boot /boot.old
    2. sudo umount /boot
    3. sudo cp -R /boot.old/* /boot
    4. sudo apt-get -f install
    5. sudo umount /boot (just in case one of the scripts remounted it, ignore any error about boot not being mounted)
    6. sudo apt autoremove
    7. sudo apt upgrade
    8. sudo umount /boot (again, just in case one of the scripts remounted it, ignore any errors again)
    9. sudo cp -R /boot/* /boot.new/
    10. sudo mount /boot
    11. cd /boot
    12. sudo rm -rf * (MAKE SURE you're in /boot before running this one!)
    13. cp -R /boot.new/* .
     

    Brains

    One of the idiots
    Rating - 100%
    3   0   0
    Apr 9, 2013
    6,923
    96
    Spring
    You're welcome. Honestly this is one of those annoyances with Ubuntu I wish they'd fix (well, prevent) in the update scripts. Something as simple as 'installing a new kernel? Check to see if there's enough free space in /boot and alert the user if needed.'
     

    Davetex

    TGT Addict
    Rating - 100%
    6   0   0
    Mar 27, 2010
    8,456
    96
    Greers Ferry Lake
    Yeah, I wish the update was......
    Ask first
    Click yes
    And done.

    Thanks again Brains, I really appreciate that command line list. Now I can fire my nephew. LOLOL
     

    benenglish

    Just Another Boomer
    Staff member
    Lifetime Member
    Admin
    Rating - 100%
    7   0   0
    Nov 22, 2011
    24,095
    96
    Spring
    sudo - Execute a command as another user.
    rm - Remove files or directories.
    -rf - When removing files, do so recursively and force the action. Don't ask me if I really mean it. Don't trip over empty files. Just use "rm" to destroy everything from here on down.

    When you do "rm -rf", you're using a switch that tells an already powerful command to extend its actions to all the directories and files below the current location. (ETA: Yes, I know that I need not list directories separately because directories aren't really directories; they're files because "everything's a file". However, this post is for folks who are not steeped the "The Unix Way." For a Windows user trying to understand their 'nix box, I have no problems in referring to directories without explaining that a directory is simply a particular type of file. If "man rm" talks about directories, which it does, I won't apologize for doing the same even though I had instructors, back in the day, who would have given me no end of crap over this issue.)

    If I executed that command in "/ben" on my computer, for example, I'd destroy everything of consequence that I've ever put on the computer.

    When you use "rm -rf", you must know where you are and you must know that you don't mind destroying everything there. You won't get a pause for confirmation and you won't get a second chance.
     
    Last edited:

    benenglish

    Just Another Boomer
    Staff member
    Lifetime Member
    Admin
    Rating - 100%
    7   0   0
    Nov 22, 2011
    24,095
    96
    Spring
    Is that edit OK, Brains? I could use some perspective from someone who has more recent experience than me.
     

    Brains

    One of the idiots
    Rating - 100%
    3   0   0
    Apr 9, 2013
    6,923
    96
    Spring
    I thought it was just fine, but then again I'm not the type of guy who gets too wrangled over, well, much of anything. ;)

    ETA: Not sure anyone wants to get into the nitty gritty of filesystems, or how the various utilities interact with them. Of course if anyone does, I guarantee we both would have their heads spinning long before we finished geeking out. Before long, we'd realize it though, and just nod our heads saying "inode, inode, that was too much info."
     
    Top Bottom