Naked Science Forum

Non Life Sciences => Geek Speak => Topic started by: syhprum on 14/10/2015 22:11:08

Title: Is a software shutdown needed with solid-state (SSD) drives?
Post by: syhprum on 14/10/2015 22:11:08
My neighbours children love to play "KIZI" games on my computers and I have always emphasised to them that they should make a software shut down before cutting the power.
This seems to be a sensible precaution with HDD drives but is it needed with SSD drives ?
Title: Re: Is a software shutdown needed with solid-state (SSD) drives?
Post by: evan_au on 15/10/2015 11:57:13
If the game creates and destroys temporary files on the disk, it will update some parts of the disk directory structure and the list of free sectors.

A software shutdown writes all of these values to the disk, so the values are consistent, ready for the next startup. It then retracts the heads to a landing zone, and stops the disk rotating; this prevents mechanical damage to the disk surface containing important data.

If you shut down the disk suddenly, some of the data values may be written to disk, but not others, leading to an inconsistent state of the disk directory. You could then overwrite parts of files and directories, thinking they are unused, and scramble your files. While a solid state disk or USB drive have no problems with a mechanical "head crash", inconsistent directory structures are a very real risk.

On some older operating systems, after an improper shutdown, you needed to do a disk integrity check and repair before starting the operating system.

Most home computer users don't have the discipline to run diagnostics, so I suspect that modern operating systems regularly update the disk directory information on disk, and do it in a sequence that minimizes damage in case of sudden shutdown. The first thing they do on startup or USB insertion is to do a quick check of the directory structure, and repair any obvious problems.

So I recommend a proper software shutdown (eg Eject, Hibernate, Shutdown) whenever possible before turning off your computer, or unplugging a USB drive.
Title: Re: Is a software shutdown needed with solid-state (SSD) drives?
Post by: nicephotog on 29/12/2015 06:40:07
Presuming your in Windows

CHKDSK /R/F C:
You should get a message telling you it cannot dismount the volume and a question Y or N answer for "do you want to do a disk check on next startup?"

Whether Linux or Windows , if the disk file-system has to be checked it usually requires between 1/2 an hour to and hour(T.byte disk with many files) , but is a very good idea to do once per month if not once a week if possible.

Linux uses fsck command and in various formats because it often runs many different partitions that are formatted in a file-system generic to some other commercial OS such as POSIX , Solaris , IBM Unix ...etc.
It is simply best to dismount the filesystem without the root-filesystem on the command line or order a disk check on startup a bit alike the above CHKDSK request.
Normally Linux in X32 kernel uses wither Ext2 or Ext3 filesystem and with some ext2 is compulsory for the root file-system.
X64 kernel uses ext4, though you may be given a choice dependent the distribution.
Because a full integrity check should occur some-time assigned by the user, Linux does often show startup customisations in the customising "system settings utility menu" as having a full disk integrity check on booting as automatic if you want !
good idea , because to check a file-system partition the disk partition should be in a dismounted state !!
Just remember it can take around an hour to complete.
Basic info for various Linux.
 http://www.thegeekstuff.com/2012/08/fsck-command-examples/
Title: Re: Is a software shutdown needed with solid-state (SSD) drives?
Post by: chris on 29/12/2015 10:07:25
Dear nicephotog - have you come across the dual boot problem that appears to be happening with Debian / possibly other distros and Windows 10 installed on M.2 SSD?

Title: Re: Is a software shutdown needed with solid-state (SSD) drives?
Post by: nicephotog on 30/12/2015 02:06:45
No, but i had a quick look at some posts in other forums, AND
i presume the disk has been "added" onto the hardware BUS belt "while a primary drive exists"(not necessarily),
So the MBR sector(Master Boot Record) on the original disk is the registered track to store the jump to the OS to use whether choices or not so the original disk has to be listed as the primary drive for the BIOS to search for OS instruction starter point markers.
Also too "a note" sometimes when conventional disks are linked to the BIOS information, they are hand written into the BIOS (very rare now-days).
So hence too it is possible to require to remove the old previous primary disk record in the BIOS and then auto-detect or write into records(in BIOS-mode) the M.2 SSD and assign primary to it. to prevent ambiguous records.

And just after the fourth edit , i remembered, there are "jumpers" at the back of most disks that determine the mode by hardware , so those would need to be changed on both disks to assist reflecting the disks status.
Note the hardware jumpers and BIOS assignments must be done if both disks run together but Linux will give a choice of where to put the MBR on the disk and whether to erase the old MBR(sector).
Title: Re: Is a software shutdown needed with solid-state (SSD) drives?
Post by: chris on 01/01/2016 22:17:28
In theory, the M.2 drive is operating as the primary source, as specified in the BIOS... It fails to write GRUB, no useful error as to why. I'm not sure if this is a Windows 10 issue exclusively, or an M.2 drive problem, or both...
Title: Re: Is a software shutdown needed with solid-state (SSD) drives?
Post by: nicephotog on 01/01/2016 23:01:18
GRUB is a boot-loader of the chosen/default OS to load on startup supplied by Linux.
It is put in at setup.
If you were putting in a second OS either the Linux or the windows (presumably the Linux this time) to have a dual OS on the drive, sometimes it is undefined where to put the MBR, maybe more so on an SSD because there is no LANZ CYLINDERS or HEADS.
Cylinders and heads and their track physical locations determine the needle that has the disk start marker location physically(SSD is a wopping great lump of RAM like system).
I will presume its an OS new enough to install with an SSD , probably safe because SSD have been around half a decade now.
LILO is the more common successful boot-loader, GRUB i have only seen install properly if it were onto a new disk or it was there before for an upgrade.
With an SSD it may be better to make a very small 100Mb(mega byte) partition of type "/boot"(may be a good strategy with an SSD because of the before mentioned difference between traditional and SSD physical construction) with CFDISK format it then choose it to install the boot-loader to when you are asked at the end of setup.
Choose LILO to overwrite the previous system if it failed, or if the install had GRUB and grub did not seem to work when you did the first install !
You can often use your install disk to jump over a successful install to the end where you asked for the boot-loader to install.

Title: Re: Is a software shutdown needed with solid-state (SSD) drives?
Post by: chris on 02/01/2016 10:51:23
I tried LILO when GRUB failed. It is offered as an alternative during Debian install. Neither worked. Same error - "Couldn't write GRUB/LILO".

When Debian installs on an established system you can re-partition and establish a dedicated Linux partition; this I did, allowing Debian to establish its own pattern of partitions (for boot, swap, tmp, home etc) and format them as ext4 in the free (non-Windows) partition space I had created. It worked swimmingly until it failed trying to write GRUB.

I've done this without incident on other existing windows platforms that I have dual-booted and modified the partitions. It's just this time that it has failed.

I am surprised that Debian haven't encountered this and patched it. The machine was a clean build and all latest drivers and technology.
Title: Re: Is a software shutdown needed with solid-state (SSD) drives?
Post by: nicephotog on 03/01/2016 01:38:36
chris, did you choose "overwrite MBR"(a question you see around that time usually a check-box) or not with that? (what for each attempt) ,
and is the bios set for boot from primary disk or "go-back to primary disk from this once on some other hardware BUS device port"?

If you used an install disk, you can find a menu of useful options when it starts such as cfdisk so you know where your partitions are mounted and where win and linux live with relation to e.g. "/dev/hda3" or whatever.
One of those menu choices should be some form of (something like) "rescue" , "install boot-loader alone" or "make a boot disk".

If you make a "boot disk" (usually now is a "totally clear" memory stick not a removable disk) you can login as Su - or root and open a text editor like Kate and open

/etc/lilo.conf

and fix quite a bit that way.

Here is a simple tutorial link
http://www.control-escape.com/linux/lilo-cfg.html
Here's some more complex boot conf
http://www.linuxquestions.org/questions/linux-newbie-8/how-to-edit-lilo-conf-201954/

If you wrote to "/boot" try again installing either with "overwrite MBR" as choice , particularly in the rescue mode or from any given install boot-loader choice on the pre-install menu after choosing keyboard.
Title: Re: Is a software shutdown needed with solid-state (SSD) drives?
Post by: chris on 03/01/2016 10:04:44
Those options don't exist; at least, I can't find them...
Title: Re: Is a software shutdown needed with solid-state (SSD) drives?
Post by: nicephotog on 04/01/2016 02:29:19
What version of Debian (and x64 or x32)?,
what type of install "media" (cd - dvd , download , usb, network)?
and you say it did not show you that choice for MBR - it also generally refers to /boot being present of which around 100mb should be the size(oddly)?

Did the install "tell you" it was formatting the partitions and "used some appreciable time (along with a message it was formatting sitting on the screen) before actual install started" (at that point too it would notice your Win partition and ask if you wanted to add it to the list of mounts).

Note: You said EXT4 so i presume you are in X64...

ALSO... Debian is usually a Gnome default desktop unless otherwise specified, It is strongly recommended to use as much of the defaults of the version as possible or small problems like this occur.
(Downloading a distro at a high speed internet cafe onto USB stick and burning the ISO image to DVD on you own machine is about the best way now)

MOVED TO OTHER QUESTION THREAD . FINALLY SAW IT.

Database Error

Please try again. If you come back to this error screen, report the error to an administrator.
Back