Tag Archives: drive

bashmount: Another seemingly roundabout solution

Mounting volumes from the console, without the need for background daemons or automounting tools, has been near the forefront of my Linux experience for years now. If it makes any difference, I’ve tried other options but still rely on mostly the same solution and setup that I did eight years ago.

Which could mean I am stuck in my ways, old-fashioned or just haven’t found a better solution yet. Or it could mean I don’t see any need to reinvent things — if it ain’t broke, don’t fix it. Adding a mount point to /etc/fstab and allowing any user to mount it seems to do the trick. I’ll let you know if it stops. πŸ˜‰

It’s not a very flashy way to handle things though, and if you want something with a little more pizazz, bashmount might deliver for you.

2015-02-25-l3-b7175-bashmount-01 2015-02-25-l3-b7175-bashmount-02

As you can see, bashmount gives you a full array of attached volumes and their status, as well as options for even more information. A lot more than my hotwired solution, anyway. :\

And further, bashmount doesn’t need any fancy daemon packages or weird dependencies, and as far as I can tell, will do its job with only bash as a background framework. Supposedly it will work with udisks2, or some automounting tools, but I didn’t test it on that point.

Although it’s informative, and pretty, and colorful, and easy to use … I don’t think I’ll be adopting it over my home-grown solution.

For one thing, it doesn’t seem to eliminate the need for my fstab solution, since attempting to mount to an unlisted location triggers an error asking for root access. Well, in that case, it would just be quicker to su to root and do things manually.

So again I have a fairly clever tool that seems to do what it’s told, but using it implies a step or two in a roundabout direction before arriving at the same destination. Sort of along the same vein as xcv, which we talked about a week ago.

It may be that you can coax bashmount into avoiding those root permissions requests, or it may be that bashmount works as you expect without any heavy editing on your part. If that’s the case, I encourage you to use bashmount for as long as it satisfies.

I think I shall stick with my direct and straight solution. Not that bashmount doesn’t scratch the itch, only that there wasn’t an itch to start with.

gdisk: A familiar face

I’ll try to keep this one quick; I am already short on time this weekend because of personal obligations. But I also think gdisk is something that resembles fdisk enough (and even perhaps cfdisk and some other partition tools) that mentioning it at all is a rehash of sorts.

Anyway, feast thine eyes:

2014-01-11-l3-b7175-gdisk

gdisk, for what I have seen, just about matches fdisk keypress for keypress, with the major difference being its relative comfort in working with the newer generation of hard drives that use GUID partition tables and not MBR style.

Wikipedia tells me the changeover took place sometime around 2009, and so it doesn’t surprise me that I use it so rarely. The newest, most powerful machine I have in the house right now is 8 years old, and I’m wondering if it isn’t time for me to upgrade that. …

I wouldn’t want to fall behind on the times, now would I? πŸ™„

nwipe: Great trepidation and fierce consternation

Both AUR and Debian agree that nwipe is the core tool once found in the dban disk annihilator tool. I say “once found” because the home page seems to have changed from what I remember, and it appears to be pitching another utility called “Blancco.”

But to add to the confusion, AUR and Debian have different home pages for the nwipe project, one pointing to Sourceforge and another to a Github page, respectively. It’s possible those are just mirrors for the project, but I do wonder if there are differences.

No matter; what you see here is the version available to Arch users.

2014-12-19-jsgqk71-nwipe

And it doesn’t look much different from the core dban program. Select a drive, step through your options, and start with F10. If you ever used the dban live system, this single program works much the same way.

You have the ability to set your erasing options as command-line flags, which is something that was technically available to the original project, if you were willing to remaster the ISO.

And the infamous “autonuke” option is still around, which starts up and immediately begins exterminating every bit of data on any drive it can find. The implications are frightening.

I see a few improvements here and there, possibly most unusual being the ability to blank the screen — not erase the screen, just empty it 😳 — while nwipe runs, ostensibly saving you the screen burn-in while nwipe eats up your hours … and your hard drive.

It might also be important since the version I used had a once-per-second flicker effect as it updated the screen. Blanking the screen was the only solution for stopping the flashing blue box in the corner of my eye.

nwipe is comfortable running outside of 80×24, but oddly, all the text will remain in those dimensions even if the frames are drawn larger. Odder still, the on-screen help along the bottom gets arbitrarily cut off at 24 characters, which seems like an oversight.

dban is a time-honored tool that I’ve been using off and on for the better part of a decade, and so I hold it in high esteem. I’ve run it for weeks on end, 24 hours a day for various reasons, and gotten great results with it.

As an offshoot, nwipe is equally regarded, even if I bundle my meager endorsement with a stern warning: Be very very careful when you use it. nwipe does not make apologies. Use with care. 😑

cfdisk: Somehow overlooked

ls vimwiki/ | shuf -n1 has again spoken again, and this time it has pointed out my error in leaving cfdisk out of the lineup nine months ago, when I traveled through the C section.

2014-07-14-6m47421-cfdisk

cfdisk uses ncurses to work as a disk partitioner with some graphical elements. I amuse myself by saying it always intended to look and behave like the original, clunky IBM fdisk utility, but got beaten to the name by fdisk. But they’re both from the util-linux package, so I don’t suppose it matters who claimed the name. πŸ˜‰

I also imagine you probably know your way around cfdisk since it is included by default in just about any distro you could mention. I honestly can’t think of anything offhand that would split away cfdisk and force you to use only fdisk. Or parted.

A small curiosity: The Arch Wiki, which I hold with the same reverence that some religions afford their holy texts, suggests that recent versions of cfdisk don’t align the first partition correctly.

I can attest to seeing some partitions start off-center, which sometimes causes an error message when polling a drive’s partition layout, but it didn’t seem to cause any damage to my system, so I paid no attention to it.

I can’t find any other information on the problem right now, but a deeper scrape of the Intarnets is probably warranted. It may also be that by this date, the error has been ironed out, and the wiki just needs updating. Or maybe you’re reading this in the future, and it has already been fixed, and you’re wondering what I’m yammering about. O_o

Regardless, I will be honest in saying that cfdisk is my tool of choice, when building new systems or setting up USB drives. I appreciate fdisk for its precision and history, but I like my visual arrangements, thank you. πŸ˜‰

smartmontools: A hard drive’s best friend

Here’s something you don’t see every day:

2014-04-30-6m47421-smartmontools-01 2014-04-30-6m47421-smartmontools-02

I mentioned a short while ago that I bought this hard drive to run in a Dell Inspiron 8000 more than eight years ago, and those screenshots are proof.

The actual conversion is up for debate, but a power-on time of 18,562 hours works out to be more than two years of working time. And it keeps on ticking. πŸ˜€

I know these things because smartmontools tells me. The suite provides a rundown on the S.M.A.R.T. data from a hard drive, then breaks apart the analysis into something vaguely human-readable.

How you interpret the information is up to you, but the beauty of it is that, as I understand it, it’s sometimes possible to get a warning that a drive is about to die.

And as someone who has heard deathly clacking noises from hard drives, any kind of warning would be a good thing. 😯

I must admit I’ve never tried to use smartmontools with either an SSD or any kind of surrogate, nonmechanical drive. It would be interesting to see though.

While it’s not a complete diagnostic tool and not a data recovery utility, it’s worth remembering that the information is available to you. Mark, and remember. πŸ˜‰

P.S., yes, I know 18,562 hours qualifies as Old_Age according to smartctl, and I should have shown that a lot of other categories are marked Pre_Fail. Don’t worry, I have planned accordingly. πŸ˜‰

regionset: This I can attest to

It’s funny to think, but I had my first experiences with regionset about six years ago. And believe it or not, I’m still a little bitter.

Not because of regionset, but because of the entire swirling morass around DVD region codes.

kmandla@lv-r1fz6: ~$ regionset -h
regionset version 0.2 -- reads/sets region code on DVD drives
Usage: regionset [device]
       where default device is /dev/dvd

For someone like me, who sometimes lives in a country beyond their “home” region, and with a small collection of DVDs from several regions, it’s absolutely asinine to prevent cross-region use.

And considering it’s tripped me up more than once, and friends to an even greater degree, it’s equally asinine to expect anyone to actually buy the same disc again just to watch a film on a machine of a different region. Or worse, buy a new player to watch specific regions.

All of which is really just a syndrome of the larger industry myopia that has been around since the late 1980s, at least. It took forever for the music industry to realize the potential in online music sales, and now it’s completely eclipsed the traditional album model.

How long before the movie industry wakes up? Like I could care. Truth be told, there’s no reason for me, as a multi-region customer, to bother buying their product any longer. Six years ago, I was better off downloading a pirated copy than dumping more money into a corrupted sales model. I daresay that hasn’t changed.

But I wander from the purpose of this post. If, in this day and age, you find you can’t use a particular DVD, and you’re fairly certain it’s because of region settings, I can attest to regionset as a potential solution.

If I recall correctly, you only get to change the region five times before the drive is fixed upon the last setting. After that, it won’t let you change it again.

After that, if you’re still not sure what region you want, then I think you really should move away from DVDs. πŸ˜•

photorec: Taught me something new today

I just had a very, very illuminating session with photorec, which might be strangely named considering what it can do, but is still a great console application.

photorec is part of the testdisk suite (or at least it is in Arch), but it doesn’t just recover photos. It can scrape through a drive and recover almost anything.

And from almost any filesystem, I might add, although you’ll need to know beforehand what the filesystem is.

2014-03-02-lv-r1fz6-photorec

photorec is menu driven for the most part, requires elevated privileges (which is good), and as far as I can tell in my experiences with it, does a great job yanking files from the jaws of death.

Now, why did I say “illuminating” earlier? Well, in one of my test runs this morning I grabbed a leftover flash drive that I hadn’t used in a while, ran dd over it for a few seconds, repartitioned it, dumped a couple of text files on it, deleted them, and then sent photorec to work.

Originally the drive had been formatted in ext4, but I repartitioned it to hold a vfat partition, just because I wanted to see what photorec would do with a non-Unix drive.

photorec found the original text files I dropped there a few minutes earlier, then kept scrounging and found music files I had on the drive before I repartitioned and reformatted it. I kid you not. 😯

And … they played perfectly in mocp. 😯

Until this morning I assumed that data files from completely different file systems on drives that had been repartitioned and reformatted … would be irretrievable. How wrong I was. 😳

I know enough to realize that without letting dd run its course over the whole drive, that data was still exposed. But I honestly thought since they weren’t listed in file table or were in a completely different filesystem, they wouldn’t be so easily brought back.

But there you have it. photorec taught me something new today, and I am wiser for it. Now please excuse me while I rig an entire laptop to run dban over every drive I own. … πŸ˜•