• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 547
  • Last Modified:

fix ubuntu boot drive

I am just starting with ubuntu and I was able to successfully install the 12.04 server on an old Dell SC440 server and all was well until this morning.  This morning I saw a message about a hard drive problem and it is the boot drive.  It says immediate failure is eminent.  I know that there is, or should be a way to find the errors and repair the drive, but obviously it can not be done on a active (mounted) drive.  I do not know any of the shell commands yet, let alone how to get out of the GNOME to the shell.  Could someone assist me an provide the directions on (1) how to exit to the shell (Ok, you can stop laughing now) and (2) the command to reboot the system and check and repair the drive prior to bringing up the system.  (6 months from now I will be embarrassed by this request, but now is when I need the assistance!  LOL
If I have to ditch the drive or reformat and reinstall, so be it, installation was not too bad..

Thanks in advance
0
blberger
Asked:
blberger
  • 10
  • 7
2 Solutions
 
Darr247Commented:
Ctrl+Alt+F1 / F2 / F3 / F4 / F5 / F6
gets you to a CLI shell if you don't want to use terminal, in most linux distros.
(Ctrl+Alt+F7 through F12 usually opens more instances of the GUI, but most people use multiple desktops instead of Ctrl+Alt+F7 and up).

But usually when you get SMART messages it means all the spare sectors have been mapped out, and it really IS time to replace the drive. So unless you know it's fairly new (in which case it should still be under warranty), you should seriously consider buying a new one.

And using a boot disk (or USB stick) like System Rescue CD would probably be the better way to go with this.

Or, fsck is the linux chkdsk. Is that what you meant?
(in a terminal window, run
$ man fsck
and use 'q' to quit out of manuals.)

edit:
Oh, and unless you know for sure you installed GNOME and switched to it at logon, 12.04 uses the Unity desktop.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
>> If I have to ditch the drive or reformat and reinstall, so be it, installation was not too bad..
SMART errors for me mean it's time to replace the drive. Since it's an old server, the drive is probably just worn... I'd replace it and reinstall, enjoy Linux :)
0
 
blbergerAuthor Commented:
I have just replaced the drive with a much smaller drive (500Gb) and re-installed ubuntu 12.04 and then added ubuntu-desktop, but when I try to access samba to configure the shares,  password is coming up wrong.  When installing, I always use the same password (I know bad practice, but I am the only one using the server on my closed network).  
The old drive had everything configured just perfect.  Is there any way to image over the os install from the bad drive (it still boots) to the new drive to save an install and reconfigure?

My procedue for install was
(1) run ubuntu 12.04 server install from downloaded CD
(2) at the $ prompt - add ubuntu desktop with :      sudo apt-get install ubuntu-desktop
(3) at the $ prompt - add samba with :   sudo apt-get install samba
(4) at the $ prompt - rebooted with :   sudo reboot

After the reboot - when I tried to configure samba, it would not accept my password that I provided during the install of 12.04 server.

(I am getting a little better - read over the holiday...LOL  )

I do like the GUI, but not familiar hot to launch the one that comes with server??
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
Darr247Commented:
If you can make the partition[s] that hold the old installation smaller than the partition[s] on the new drive (e.g. using GParted), Clonezilla should be able to clone the partition[s] to the new drive and resize the file system to fit the new partition[s] after the clone.
http://clonezilla.org/clonezilla-live-doc.php
0
 
blbergerAuthor Commented:
Thanks a lot.  I will attempt this later this evening.   BTW How do I start the Unity Desktop from the command line prompt $?


Thanks again
0
 
Darr247Commented:
Are you saying Ctrl+Alt+F7 / Ctrl+Alt+F8 / Ctrl+Alt+F9 et cetera doesn't take you back?
0
 
blbergerAuthor Commented:
I am referring to right after I finish the install and the server reboots, it will bring me back to the terminal mode with the $ prompt.  I have not tried Crtl-Alt_F7, because there was no GUI previously loaded.  If when the server boots and then presents the $ prompt, is that the keypress that launches the Unity GUI?  And how can I set it so it launches into the GUI automatically upon restart?

Thanks - you have been very patient and helpfull to a newbie...!
0
 
Darr247Commented:
If you have already installed GNOME, then
$ sudo startx
should start the GUI.

If it doesn't, run these 3 commands
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install --no-install-recommends ubuntu-desktop

then reboot and you should be offered a picklist at login from which you can choose GNOME desktop. The '--no-install-recommends' part makes it keep the server kernel.

$ sudo apt-get install xubuntu-desktop
installs the XFCE desktop. That's the one with the mouse in the middle of the desktop.
Again, you can choose the XFCE desktop from the picklist at login.

and
$ sudo apt-get install kubuntu-desktop
installs the KDE desktop.

I'll have to take a picture of the login/desktop picklist later, if you can't find it... the PrntScrn button isn't functional yet at that point.
0
 
blbergerAuthor Commented:
Your assistance was above and beyond what I expected.   Thanks  - They should award you an extra 1500 points......
0
 
blbergerAuthor Commented:
Unfortunately - I am still having major difficulty with samba after I install the GUI.  When I launch samba to configure it, it asks for a password, and I enter the only password that I have entered (for my username and the MySQL) and it is not recognized.

I have done a complete ubuntu 12.04 LAMPs server install from scratch (only selecting SSH, LAMOP and Samba from the list of applications) and completed the install.  Ran update and upgrade from the $ prompt and then installed xubuntu-desktop.  After which I try to configure samba and can not find samba.  So I re-install samba using sudo apt-get install samba, but when I launch samba in the GUI, it asks for a password, which I suppose is my password and it fails.

Not good....
0
 
Darr247Commented:
> but when I launch samba in the GUI,

Exactly how are you launching samba in the GUI?
0
 
blbergerAuthor Commented:
After the complete install of ubuntu 12.04 I  (I did check the applications for SSH Server, LAMPS and Samba during the software selection) issue the following commands:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xubuntu-desktop
sudo -apt-get update
sudo apt-get upgrade
sudo reboot

One the server comes back up I look for samba and it is not there.  So I find it in the Software list and select install.  Once installed again (and it does not prompt for a password), I open it up to configure, and enter the only password that I use on the server for all, and it does not function - bad password....:-(
0
 
Darr247Commented:
> I open it up to configure

Again, exactly how are you doing that?

If you open a terminal and run
$ sudo system-config-samba
are you getting the same configuration menu[s]?
0
 
blbergerAuthor Commented:
I have not run that command.......???? I was opening up samba in the GUI and then it was prompting me for a password for system-config-samba.  I was using my user password, which was failing.  So, I guess I missed something.....


I will try that from the command line.
0
 
blbergerAuthor Commented:
I tried running the command

$ sudo system-config-samba

But got an error as an unrecognized command
0
 
blbergerAuthor Commented:
Well - here is the final chapter in the finally ending saga of a nubie's attempt at a Ubuntu server with samba.

I re-installed the server from CD as before and then ran update and upgrade.  Installed the ubuntu-desktop as you suggested.  I next found a video on you-tube that had step by step instructions on how to modify the smb.conf file to add the shares manually and change the security on the shares and make the directories available to WINS on my network.  That worked just perfect. (Oh by the way, after I made the manual changes to the conf file, I was able to open samba from the desk top successfully!)

I appreciate your assistance.... just needed a 2x4 to the head once and awhile to keep moving along!)
0
 
Darr247Commented:
For what's worth, you might try SWAT as a GUI to configure samba... search for it in Ubuntu's package manager. It's browser-based.
0
 
blbergerAuthor Commented:
I really appreciate your persistence to assist and make things easier.  I will do a search tonight.  But I was able to successfully attach @10Tb of drive space in shared folders to support my Video and Music collection on my WAN....  Wife is happy......:-)

Barry
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 10
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now