LinuxQuestions.org
Visit Jeremy's Blog.
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 09-25-2014, 03:09 PM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 546

Rep: Reputation: 37
zerofree hell


I can't get zerofree to work and I've spent hours on this.
I'm running centos6.5 64 bit with zerofree-1.0.3-1, my root partition is /dev/mapper/vg_x2100centos6v-lv_root.
if I try to run zerofree in a normal console I get:
Quote:
# zerofree -v /dev/mapper/vg_x2100centos6v-lv_root
zerofree: filesystem /dev/mapper/vg_x2100centos6v-lv_root is mounted rw
so I sent the machine in runlevel 1 with #init 1 and tried the same command again and I get the same thing (zerofree: filesystem /dev/mapper/vg_x2100centos6v-lv_root is mounted rw).

so (following the instructions here) I then ran:
Quote:
# mount -n -o remount,ro /dev/mapper/vg_x2100centos6v-lv_root
mount: / is busy
I get stuck here, I cannot get past this 'busy' error.

So I also tried rebooting the machine into runlevel 1 tried again but still the command doesn't work. In runlevel1 zerofree can't see the root partition and mount commands don't work
what do I have to do to get zerofree to run?

Last edited by tonj; 09-26-2014 at 10:45 AM. Reason: solved
 
Old 09-25-2014, 04:00 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,618

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
how did you install it ?
from a source build ?
http://intgat.tigress.co.uk/rmy/uml/index.html
http://intgat.tigress.co.uk/rmy/uml/zerofree-1.0.3.tgz
or some other way
 
Old 09-25-2014, 04:06 PM   #3
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
I installed it from http://repos.zendbox.com/
I would have installed it from zerofree-1.0.3.tgz but I couldn't find any install instructions anywhere.
 
Old 09-25-2014, 09:06 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,220
Blog Entries: 28

Rep: Reputation: 6114Reputation: 6114Reputation: 6114Reputation: 6114Reputation: 6114Reputation: 6114Reputation: 6114Reputation: 6114Reputation: 6114Reputation: 6114Reputation: 6114
Quote:
I would have installed it from zerofree-1.0.3.tgz but I couldn't find any install instructions anywhere.
Usually, there is a README in the tarball that gives instructions about how to install a package.

This article gives a good overview of installing from sources.

http://www.thegeekstuff.com/2012/06/...l-from-source/
 
Old 09-26-2014, 10:35 AM   #5
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
SOLVED: zerofree hell

I solved this issue: (btw there was no readme in the unpacked zerofree souce file, there was nothing to go on). These steps worked for me, maybe they will help someone with the same problem:
1) make a backup copy of /etc/fstab
2) edit /etc/fstab and change the following 'default' values to 'ro'.
Quote:
/dev/mapper/your_root_partition / ext4 ro 1 1
UUID=<very-long-string> /boot ext4 ro 1 2
/dev/mapper/your_home_partition /home ext4 ro 1 2
3) reboot <-- partitions will now be in read-only
the following was done in a putty console from another pc:
6) # echo "u" > /proc/sysrq-trigger
7) # mount /dev/mapper/your_root_partition/ -o remount,ro
8) # zerofree -v /dev/mapper/your_root_partition
(percentage progress)....
9) # zerofree -v /dev/mapper/your_home_partition
(percentage progress)...
10) restore the root partition back to rw
# mount /dev/mapper/your_root_partition/ -o remount,rw
10a) restore original /etc/fstab from backup copy you made in step 1.
11) check /etc/fstab. make sure it's back to default
12) reboot <--- machine will now boot as normal.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
What the hell did I do? Tux-Slack Slackware 6 06-03-2007 06:45 AM
go to hell.... A-dummy General 10 08-30-2006 09:06 PM
What the hell is this?! navarre9 Linux - General 5 04-27-2004 02:12 PM
what the hell?? watashiwaotaku7 General 4 10-10-2003 09:16 AM
hell with it.... Chijtska Linux From Scratch 5 02-15-2002 09:01 AM

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

All times are GMT -5. The time now is 09:12 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