[SOLVED] Can't access partition on hard disk with linux OS installed
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508
Rep:
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?
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
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508
Original Poster
Rep:
Quote:
Originally Posted by syg00
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.
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508
Original Poster
Rep:
Quote:
Originally Posted by colorpurple21859
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!
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.
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.
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508
Original Poster
Rep:
Quote:
Originally Posted by colorpurple21859
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.
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508
Original Poster
Rep:
Quote:
Originally Posted by replica9000
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.