<p>The hard drive should appear in the same place when live cd booted. Only Microsoft changes the identity of the drive relative to the boot source.</p>
<div class="gmail_quote">On May 12, 2012 12:02 PM, "Ron Frazier (ALE)" <<a href="mailto:atllinuxenthinfo@techstarship.com">atllinuxenthinfo@techstarship.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
Hi Jim,<br>
<br>
I thought that -n switch was read only. However, when I tried to run badblocks -n, it refused to run. I also saw that warning in the man page, so I'm not going to try to force it to run. Mike T also suggested dismounting the file system to run the test. So I think I'll try that. That brings up more questions. Will the following procedure work?<br>
<br>
Detour. While I was writing this, I went to the computer and tried something else. On this machine, /boot is /dev/sda2 and / is /dev/sda3. I'm running Ubuntu 11.04. The following commands worked while the system is running, since it does a read only test. I omitted the -n option in this case.<br>
<br>
-s displays ongoing status updates<br>
-v verbose<br>
-n non destructive read write test<br>
<br>
sudo badblocks -sv /dev/sda2<br>
sudo badblocks -sv /dev/sda3<br>
<br>
So, that should be at least as effective as the surface analysis is on Windows. Back to my original train of thought. If I wanted to do the nondestructive read write test, would the following work?<br>
<br>
1) Boot system from a live Ubuntu CD.<br>
2) Open a terminal.<br>
3) sudo badblocks -nsv /dev/sda2 <br>
and sudo badblocks -nsv /dev/sda3<br>
<br>
Or, would I have to do something else to access the hard drive since I booted from a CD? Also, can I check the Windows ntfs partitions in the same manner?<br>
<br>
Also, while I'm there, I would probably want to check the file systems on those two partitions. I know I can trigger that from the disk utility via Gnome, but how do I do that from the command line?<br>
<br>
Thanks for all the help.<br>
<br>
Sincerely,<br>
<br>
Ron<br>
<br>
<br>
--<br>
<br>
Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9 Mail.<br>
Please excuse my potential brevity.<br>
<br>
(To whom it may concern. My email address has changed. Replying to former<br>
messages prior to 03/31/12 with my personal address will go to the wrong<br>
address. Please send all personal correspondence to the new address.)<br>
<br>
(PS - If you email me and don't get a quick response, you might want to<br>
call on the phone. I get about 300 emails per day from alternate energy<br>
mailing lists and such. I don't always see new email messages very quickly.)<br>
<br>
Ron Frazier<br>
<a href="tel:770-205-9422" value="+17702059422" target="_blank">770-205-9422</a> (O) Leave a message.<br>
linuxdude AT <a href="http://techstarship.com" target="_blank">techstarship.com</a><br>
<br><br><div class="gmail_quote">Jim Kinney <<a href="mailto:jim.kinney@gmail.com" target="_blank">jim.kinney@gmail.com</a>> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
As a general rule, file system maintenance on a mounted file system is a very (very, VERY) bad idea. badblocks runs are file system maintenance. There is a flag -f that will force it to run on a mounted file system but the man pages have the following warning:<br>
<br> -f Normally, badblocks will refuse to do a read/write or a non-destructive test on a device which is<br> mounted, since either can cause the system to potentially crash and/or damage the filesystem even if<br>
it is mounted read-only. This can be overridden using the -f flag, but should almost never be used<br> --- if you think you’re smarter than the badblocks program, you almost certainly aren’t. The only<br>
time when this option might be safe to use is if the /etc/mtab file is incorrect, and the device<br> really isn’t mounted<br><br>I would strongly advise running this on an unmounted file system. Testing the swap space is then trivial.<br>
<br><div class="gmail_quote">On Fri, May 11, 2012 at 12:06 PM, Ron Frazier (ALE) <span dir="ltr"><<a href="mailto:atllinuxenthinfo@techstarship.com" target="_blank">atllinuxenthinfo@techstarship.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
Hi Jim,<br>
<br>
I looked at the man page for badblocks. badblocks -n looks promising. Can I run that on a mounted file system? Also, is there something I can use to test the swap area, which, in my case, is an 8 GB FILE? Or, will badblocks include this area in this case?<br>
<br>
Sincerely,<br>
<br>
Ron<div><br>
<br>
<br>
--<br>
<br>
Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9 Mail.<br>
Please excuse my potential brevity.<br>
<br>
(To whom it may concern. My email address has changed. Replying to former<br>
messages prior to 03/31/12 with my personal address will go to the wrong<br>
address. Please send all personal correspondence to the new address.)<br>
<br>
(PS - If you email me and don't get a quick response, you might want to<br>
call on the phone. I get about 300 emails per day from alternate energy<br>
mailing lists and such. I don't always see new email messages very quickly.)<br>
<br>
Ron Frazier<br>
<a href="tel:770-205-9422" value="+17702059422" target="_blank">770-205-9422</a> (O) Leave a message.<br>
linuxdude AT <a href="http://techstarship.com" target="_blank">techstarship.com</a><br>
<br><br></div><div><div><div class="gmail_quote">Jim Kinney <<a href="mailto:jim.kinney@gmail.com" target="_blank">jim.kinney@gmail.com</a>> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<p>Badblocks has a read only mode that's safe for mounted systems. It's not as thorough as the rw version as it doesn't know what's supposed to be in a block.</p>
<div class="gmail_quote">On May 11, 2012 10:01 AM, "Ron Frazier (ALE)" <<a href="mailto:atllinuxenthinfo@techstarship.com" target="_blank">atllinuxenthinfo@techstarship.com</a>> wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Jim,<br>
<br>
Isn't there anything I can run while the file system is mounted? Read only analysis would be fine.<br>
<br>
In defense of my old (computer) lady, she's still kickin' pretty good after 10 years. It's a toshiba laptop. Of course, I've added some upgrades here and there. The display hinges broke, but it works fine with an external monitor. It has a Pentium 4 single core processor at 2.4 Ghz, 1 GB of ram, and a 320 GB (I think) hdd. I don't even want to talk about the price of such a machine in 2002, but it wasn't pretty. She actually runs Ubuntu 11.04 and Windows XP pretty well. Starting up the system or large programs is a bit slow, but once they're running, it works pretty well. I started to say I could watch hulu on her, but, when I went back and tested it, the video is pretty jerky. I guess the new versions of flash are just too much of a cpu hog. I think 1/4 frame video at 30 fps would probably work, but I can't figure out how to shrink a hulu screen. I think you can shrink a netflix video to a small size. She has no problem keeping my wireless internet busy at 16 Mb!<br>
ps.<br>
<br>
I've thought of retiring her, but it just seems so heartless. Nowdays, she runs Ubuntu all the time so I can jump over there and test things even though I may have Windows running on the other machines.<br>
<br>
Sincerely,<br>
<br>
Ron<br>
<br>
<br>
Jim Kinney <<a href="mailto:jim.kinney@gmail.com" target="_blank">jim.kinney@gmail.com</a>> wrote:<br>
<br>
>Try badblocks in Linux. NOTE: that is dangerous to use on a mounted<br>
>system.<br>
><br>
>OR - pull the drive into a newer system that has a bios that can handle<br>
>it.<br>
><br>
>(seriously - dude! upgrade that dinosaur! it sucks down power like mad<br>
>doing very little)<br>
><br>
>On Fri, May 11, 2012 at 1:41 AM, Ron Frazier (ALE) <<br>
><a href="mailto:atllinuxenthinfo@techstarship.com" target="_blank">atllinuxenthinfo@techstarship.com</a>> wrote:<br>
><br>
>> Hi guys,<br>
>><br>
>> I'm running routine diagnostics on my hard drives. My normal practice<br>
>is<br>
>> to run SpinRite on them, which reads each sector, then refreshes the<br>
>> magnetic fields by inverting and writing and inverting and writing<br>
>them<br>
>> again (in the particular mode I'm using). Thus, every bit is tested<br>
>both<br>
>> with a 0 and 1 and all the original data is refreshed. I don't want<br>
>to get<br>
>> into a discussion as to the merits of this at the moment. I'm<br>
>convinced<br>
>> it's a good idea. My problem is that I have one computer that's so<br>
>old and<br>
>> the bios is so old and the hdd is so big, that SpinRite complains<br>
>because<br>
>> the bios cannot access the whole drive. So, SpinRite won't run. Once<br>
>> Windows or Linux starts up, those systems can access the whole hdd.<br>
>> However, SpinRite runs strictly at the dos / bios level from a<br>
>bootable CD.<br>
>><br>
>> At the very least, I want to do a surface analysis be reading each<br>
>sector.<br>
>> That, at least, will let the hdd controller review each sector and<br>
>> determine if it thinks there are any problems. In Windows, I can<br>
>start a<br>
>> chkdisk, either graphically or on the command line, and specify the<br>
>surface<br>
>> analysis option, and it will accomplish my goal.<br>
>><br>
>> My problem is on the Linux side of the fence. I don't know how to do<br>
>what<br>
>> I want there. I need to force the hdd to read all the sectors on the<br>
>EXT4<br>
>> main partition as well as the swap partition. Of course, I'm wanting<br>
>to do<br>
>> all this nondestructively. So, I'm wondering exactly what a long<br>
>smart test<br>
>> does, and whether it will accomplish my goal. It not, what would you<br>
>> recommend?<br>
>><br>
>> Thanks in advance.<br>
>><br>
>> Sincerely,<br>
>><br>
>> Ron<br>
>><br>
>><br>
><br>
><br>
>--<br>
>--<br>
>James P. Kinney III<br>
><br>
>As long as the general population is passive, apathetic, diverted to<br>
>consumerism or hatred of the vulnerable, then the powerful can do as<br>
>they<br>
>please, and those who survive will be left to contemplate the outcome.<br>
>- *2011 Noam Chomsky<br>
><br>
><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br>
>*<br>
<br>
<br>
<br>
--<br>
<br>
Sent from my Android Acer A500 tablet with bluetooth keyboard and K-9 Mail.<br>
Please excuse my potential brevity.<br>
<br>
(To whom it may concern. My email address has changed. Replying to former<br>
messages prior to 03/31/12 with my personal address will go to the wrong<br>
address. Please send all personal correspondence to the new address.)<br>
<br>
(PS - If you email me and don't get a quick response, you might want to<br>
call on the phone. I get about 300 emails per day from alternate energy<br>
mailing lists and such. I don't always see new email messages very quickly.)<br>
<br>
Ron Frazier<br>
<a href="tel:770-205-9422" value="+17702059422" target="_blank">770-205-9422</a> (O) Leave a message.<br>
linuxdude AT <a href="http://techstarship.com" target="_blank">techstarship.com</a><br>
<br>
<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</blockquote></div>
</blockquote></div></div></div><br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>-- <br>James P. Kinney III<br><br>As long as the general population is passive, apathetic, diverted to
consumerism or hatred of the vulnerable, then the powerful can do as
they please, and those who survive will be left to contemplate the
outcome.<br>- <i><i><i><i>2011 Noam Chomsky<br><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br></i></i></i></i><br>
</blockquote></div><br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div>