LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-06-2015, 02:20 PM   #1
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 50
Can't access partition on hard disk with linux OS installed


Hello everyone.

I have an IDE hard disk which has been formatted into ext4 file format.
I then installed a debian OS onto a partition on the hard disk using the debootstrap program. I did this using debian live USB (which doesn't have debian installer).

The debian OS installed onto the hard disk - but not properly. The gnome shell isn't working and I don't have network access.
GRUB bootloader opens up and boots the debian OS. But then I get a simple command line interface - like it was a server.

To remedy the problem, I want to add files to the installed OS so the gnome shell will open and I'll have network access.
But I'm having trouble accessing the partition.

Firstly, the partition doesn't automatically mount when I boot my live USB.
So I then mount the partition. But I still can't access the filesystem on the partition.

The GUI on the live USB only shows unmounted partitions on the hard disk.
Also, I can't access the partition's filesystem through the terminal:
Code:
root@debian:/media# ls -a
.  ..  BCC04A84C04A44BC  BIE786610
The above shows a SATA drive and cd-rom.
But not the mounted partition of my IDE drive (which has the installed OS).
Where am I going wrong?
 
Old 01-06-2015, 06:24 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,140

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
These days IDE disks show as /dev/sd?. What does this give ?
Code:
lsblk
 
1 members found this post helpful.
Old 01-06-2015, 07:05 PM   #3
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
First thing coming into my mind is before doing anything else to try
Code:
# fdisk -l
next
Code:
# fsck.ext4    /dev/sda1
/dev/sda1 is only example here
Code:
# mount -t auto  /dev/sda1    /mnt
if everything seems to be ok
Code:
# mount
which should show all mounted devices, if not
Code:
# dmesg | tail
to see for reason why mounting failed
 
1 members found this post helpful.
Old 01-06-2015, 08:09 PM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,368

Rep: Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592
You got several threads going about this install using debootstrap. Since you already have the base system installed maybe this will help. This is assuming you have an internet connection with live-usb
to unmount sda1 if already mounted.
Code:
umount /dev/sda1
Then to mount so things will work
Code:
mount /dev/sda1 /mnt
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys /mnt/sys
next copy resolv.conf from host so as to not have resolve errors when running apt-get
Code:
cp /etc/resolv.conf /mnt/etc/resolv.conf
Then chroot
Code:
chroot /mnt /bin/bash
Then
Code:
editor /etc/apt/sources.list
to look similar to this so as to install firmware
http://ftp.uk.debian.org/debian wheezy main non-free
Code:
apt-get update
apt-cache search firmware
apt-get install firmware-linux-nonfree
to see what firmware packages are available for your hardware and install.
Code:
tasksel --list-tasks
(List the tasks available on a system.)
Code:
tasksel install gnome-desktop --new-install
Quote:
(The option --new-install ensure we end-up with what DebianInstaller would have installed)

Last edited by colorpurple21859; 01-06-2015 at 09:39 PM.
 
2 members found this post helpful.
Old 01-07-2015, 07:53 AM   #5
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by syg00 View Post
These days IDE disks show as /dev/sd?. What does this give ?
Code:
lsblk
This seems a better human-readable command to 'mount'. The output I get is:
Code:
root@debian:/home/user# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 149.1G  0 disk 
├─sda1   8:1    0  39.1G  0 part 
├─sda2   8:2    0  39.1G  0 part 
├─sda3   8:3    0  39.1G  0 part 
├─sda4   8:4    0     1K  0 part 
└─sda5   8:5    0  29.3G  0 part 
sdb      8:16   0 931.5G  0 disk 
└─sdb1   8:17   0 931.5G  0 part 
sr0     11:0    1   2.4G  0 rom  /media/BIE786610
sdg      8:96   0  29.8G  0 disk 
├─sdg1   8:97   0  29.8G  0 part /lib/live/mount/medium
└─sdg3   8:99   0   1.3M  0 part 
loop0    7:0    0     1G  1 loop /lib/live/mount/rootfs/filesystem.squashfs
Oddly, my SCSI (sdb) and IDE (sda) drives aren't automatically mounted.
However, when I use the desktop file manager under 'Places' it lists the SCSI drive and automatically mounts it if I click on it.
The sda1 partition which has debian installed on it is actually now showing up under 'Places'! So I can access it. I've just installed more files onto the debian OS in sda1.
I think the problem must've been I didn't originally install all the files correctly onto sda1.
 
Old 01-07-2015, 08:08 AM   #6
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by igadoter View Post
Code:
# fsck.ext4    /dev/sda1
The output is:

Code:
root@debian:/home/user# fsck.ext4 /dev/sda1
e2fsck 1.42.5 (29-Jul-2012)
primus: clean, 131822/2564096 files, 1160902/10240000 blocks
So thankfully the partition doesn't have any errors.

Quote:
/dev/sda1 is only example here
Code:
# mount -t auto  /dev/sda1    /mnt
This has mounted the partition. Thank you!
 
Old 01-07-2015, 08:28 AM   #7
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by colorpurple21859 View Post
You got several threads going about this install using debootstrap. Since you already have the base system installed maybe this will help. This is assuming you have an internet connection with live-usb
I've done as you've said and it worked!
Debian opens up to the desktop and now I have a fully working linux OS on my hard drive! So debootloader cuts out the need for burning cds!

So this must mean the 'cp /etc/resolv.conf /mnt/etc/resolv.conf' command will work if a live USB is being used to install an OS onto hdd via debootloader.

The install wasn't entirely successful though. It couldn't find 'firmware-linux-nonfree':
Code:
root@debian:/# apt-get install firmware-linux-nonfree
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package firmware-linux-nonfree
Also, the 'tasksel' command gave an error message:
Code:
root@debian:/# tasksel --list-tasks
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
So just like my live USB, the gnome shell and debian-installer fails to load, and I have no sound.
But at least I have debian on hard disk with persistence! Thanks so much dude!
 
Old 01-07-2015, 08:45 AM   #8
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,368

Rep: Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592
install locales with
Code:
apt-get install locales
for the firmware did you edit the /etc/apt/sources.list file and do a apt-cache search firmware for the correct pkg name? Also did you setup you timezone and add a user?

Last edited by colorpurple21859; 01-07-2015 at 08:51 AM.
 
Old 01-07-2015, 09:01 AM   #9
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,130
Blog Entries: 2

Rep: Reputation: 260Reputation: 260Reputation: 260
Quote:
Originally Posted by Higgsboson View Post
I've done as you've said and it worked!
Debian opens up to the desktop and now I have a fully working linux OS on my hard drive! So debootloader cuts out the need for burning cds!

So this must mean the 'cp /etc/resolv.conf /mnt/etc/resolv.conf' command will work if a live USB is being used to install an OS onto hdd via debootloader.

The install wasn't entirely successful though. It couldn't find 'firmware-linux-nonfree':
Code:
root@debian:/# apt-get install firmware-linux-nonfree
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package firmware-linux-nonfree
Also, the 'tasksel' command gave an error message:
Code:
root@debian:/# tasksel --list-tasks
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
So just like my live USB, the gnome shell and debian-installer fails to load, and I have no sound.
But at least I have debian on hard disk with persistence! Thanks so much dude!
Make sure your /etc/apt/sources.list file has this entry:
Code:
deb http://ftp.us.debian.org/debian/ unstable main non-free contrib
Then you need to run apt-get update so apt will get a list of the new packages available.
 
Old 01-07-2015, 01:20 PM   #10
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by colorpurple21859 View Post
install locales with
Code:
apt-get install locales
I have now done this and I think it worked ok.
The time and date on the desktop is correct.

Quote:
for the firmware did you edit the /etc/apt/sources.list file
I forgot about that.
I've gone to /etc/apt/sources.list as root and manually added 'non-free' and 'contrib' to the website.
I also changed it from 'US' to 'UK' hoping that a closer mirror will be better for me.

Quote:
and do a apt-cache search firmware for the correct pkg name?
I did apt-get update and then apt-cache search firmware.
I got a long list. So I installed alsa-firmware-loaders and firmware-linux-nonfree. The latter pkg had the following error message:

Code:
update-initramfs: Generating /boot/initrd.img-3.2.0-4-amd64
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168f-2.fw for module r8169
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8168f-1.fw for module r8169
So I'm not sure what that means?
There is still no sound and an error message at boot seems to point to my radeon HDMI connection. I think that's preventing me from getting sound and loading gm3.

Quote:
Also did you setup you timezone and add a user?
Yes! That happened when I booted up after the additional installs.
 
Old 01-07-2015, 01:41 PM   #11
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by replica9000 View Post
Make sure your /etc/apt/sources.list file has this entry:
Code:
deb http://ftp.us.debian.org/debian/ unstable main non-free contrib
Then you need to run apt-get update so apt will get a list of the new packages available.
I have now done this. I've additionally installed firmware-realtek because I think I have something to do with that on my pc. Also lshw-gtk and lshw (information about hardware configuration)

I've done a reboot after all that, but still no sound. Is there a way of fixing on which hardware is the issue?
 
Old 01-07-2015, 01:48 PM   #12
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Woah, the gnome shell is now working! It's looking like a cool desktop!
Should I start a new thread about the sound problem?
 
Old 01-07-2015, 03:23 PM   #13
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,368

Rep: Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592Reputation: 1592
This might help.
https://wiki.debian.org/SoundConfiguration https://wiki.debian.org/SoundFAQ
 
Old 01-07-2015, 05:48 PM   #14
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Original Poster
Rep: Reputation: 50
Quote:
Originally Posted by colorpurple21859 View Post
Thanks dude. This is a good place to start!
 
  


Reply



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
partition layout , hard disk name and hard disk size in single output ?? jheengut Linux - Software 1 11-03-2013 05:13 AM
Access hard disk with deleted Linux partition demonvsgod Linux - Newbie 2 07-04-2013 08:33 PM
Can linux be installed only on hard disk and no use of ram Sanpreet Singh Linux - Newbie 2 01-16-2013 03:56 AM
How to format external hard disk where Linux is installed Renu Shah Linux - Hardware 3 08-06-2012 11:20 AM
[SOLVED] Not able to access a Hard Disk Partition in fedora 14 fabe856 Linux - Software 6 05-21-2012 06:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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