LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   HOW-TO: Install Debian using debootstrap. (https://www.linuxquestions.org/questions/debian-26/how-to-install-debian-using-debootstrap-4175465295/)

Higgsboson 01-05-2015 05:46 AM

I have used this method but have encountered a problem. The distro won't open up when I boot up my hard disk.
I have a black screen appearing with:

Code:

Debian GNU/linux 7 host ttyl
I then have a login prompt. I've logged in as root and user, but after that I simply get:

Code:

root@host:"#
After that, I don't know what to do.
Can anyone help please?

Head_on_a_Stick 01-05-2015 06:04 AM

@Higgsboson -- I did try to tell you this wasn't the way to go...

Have you installed xorg & some some of desktop environment/window manager?

Did you read post #10?

Use tasksel to install a desktop exactly how the installer would have done it (without your intervention and much quicker):
https://wiki.debian.org/DebianDesktop/Tasks

Higgsboson 01-05-2015 06:34 AM

Quote:

Originally Posted by Head_on_a_Stick (Post 5295575)
@Higgsboson -- I did try to tell you this wasn't the way to go...

Have you installed xorg & some some of desktop environment/window manager?

Did you read post #10?

Use tasksel to install a desktop exactly how the installer would have done it (without your intervention and much quicker):
https://wiki.debian.org/DebianDesktop/Tasks

The problem is I used debootstrap to install a full debian OS with a gnome desktop package.
I'm just wondering why the OS allows me to login but doesn't open up the desktop.

When I boot up my live debian USB the hdd with the new OS doesn't mount automatically.
When I mount the correct partition, it shows there is 3.9GB of data on it.
This must mean the OS has been installed.
However, I'm wondering why the gnome desktop won't open up.

Head_on_a_Stick 01-05-2015 07:38 AM

You shouldn't use the X server (graphical desktop) as root -- it is fundamentally insecure.

Generate a normal user for day-to-day tasks using the `adduser` command.

If you have a console login and you have used tasksel to install GNOME then you can start the desktop using:
Code:

startx
However, tasksel would have also dragged in & installed the GNOME Display Manager (GDM) and you would use this to login rather than the console.

If you have installed GNOME manually, you may also need GDM (although I'm pretty sure this is part of the GNOME package in Debian) and you may need to enable it.

With systemd I would use:
Code:

# systemctl enable gdm3
But there seem to be some problems with this under jessie:
http://forums.debian.net/viewtopic.php?f=6&t=119768

I'm not sure how to do this under SysVinit; try using:
Code:

# chkconfig gdm3 on

Higgsboson 01-05-2015 07:47 AM

Quote:

Originally Posted by replica9000 (Post 4968093)

Setup the target partition for install:
----------------------------------------------------------------------------------------
Create your filesystem, your mount point, and mount your partition:
Code:

root@host# mkfs.ext4 -L Debian /dev/sda1
root@host# mkdir /mnt/deboot
root@host# mount -t ext4 /dev/sda1 /mnt/deboot


I wonder if you can help again please.

1. Since I already have a hdd with an ext4 partition, at this stage I used the following commands (my partition is also sda1):
Code:

root@host# mkdir /mnt/deboot
root@host# mount /dev/sda1 /mnt/deboot

As you can see, I didn't use:
Code:

root@host# mount -t ext4 /dev/sda1 /mnt/deboot
Will this have caused the problem in my install?
Since I'm using a live USB without persistence, unfortunately I can't go into debootstrap.log for error messages.


Quote:

Installing the base system:
----------------------------------------------------------------------------------------
Code:

root@host# debootstrap --include=linux-image-amd64,grub-pc --arch amd64 unstable /mnt/deboot http://ftp.us.debian.org/debian

2. As per your previous answer, I substituted 'unstable' with 'stable' to get the stable version of Debian.
However, whilst the package was installing, I did read some error messages about not having relevant firmware.
So what would be the command to get the debian_non-free version?

I'm thinking of using debootstrap again for a different target partition on my hdd.
Once I have the answers to the above questions, then I should be good to go.

3. The debootstrap method binds and copies files from the host OS which is very economical. In my particular situation, I'm using a slightly altered debian live USB. So I'm hoping that the relevant host files haven't had some records deleted.
However, that's just my situation and shouldn't affect others who didn't make their live USB with the Yumi program.

replica9000 01-05-2015 09:24 AM

Like Head_on_a_stick suggested, gdm3 wasn't automatically installed, since gnome-shell doesn't seem to depend on it. You can install it using apt-get install gdm3 .

Quote:

Originally Posted by Higgsboson (Post 5295601)
As you can see, I didn't use:
Code:

root@host# mount -t ext4 /dev/sda1 /mnt/deboot
Will this have caused the problem in my install?
Since I'm using a live USB without persistence, unfortunately I can't go into debootstrap.log for error messages.

I can't see that causing an issue. debootstrap.log would be on the partition you are installing Debian to, but is removed once debootstrap is successfully completed.

I just did a test install of stable in a virtual machine, only doing apt-get install gdm3 gnome-shell, and everything appears fine.

Higgsboson 01-05-2015 11:41 AM

Quote:

Originally Posted by replica9000 (Post 5295653)
Like Head_on_a_stick suggested, gdm3 wasn't automatically installed, since gnome-shell doesn't seem to depend on it. You can install it using apt-get install gdm3 .

Thank you. So I have a workable debian installation on my hdd! Well, that's a good thing!
Also, gdm3 is to do with the shell. But somehow the shell isn't loading.

I used:
Code:

apt-get install gdm3
The output was 'unable to get some archives'. The error message suggested 'apt-get update', which I did.
The update worked which must mean the network connection is fine. I also did 'apt-get upgrade'.

But the repeated error message is 'could not resolve ftp.us.debian.org'

I then tried:
Code:

apt-get install gnome-shell
But the output is '0 upgraded, 0 newly installed' etc...
So this seems like it's got all the gnome files but for some reason it's not activating.

Even so, this clearly shows debootstrap works. I'm just wondering what the problem is in my scenario.

replica9000 01-05-2015 12:09 PM

Quote:

Originally Posted by Higgsboson (Post 5295707)
The output was 'unable to get some archives'. The error message suggested 'apt-get update', which I did.
The update worked which must mean the network connection is fine. I also did 'apt-get upgrade'.

But the repeated error message is 'could not resolve ftp.us.debian.org'

So I'm confused whether your network connection is good or not. What does ifconfig show? You should see an entry for eth0 and for lo. If only for lo, then you should run dhclient eth0 to activate your network connection (assuming you use DHCP). If that solves your network issue, you need to add this to your /etc/network/interfaces file.
Code:

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

Once your network is working, you'll probably want to run apt-get install gnome-terminal, so you have a terminal emulator under Gnome.

Higgsboson 01-05-2015 12:39 PM

Quote:

Originally Posted by replica9000 (Post 5295728)
So I'm confused whether your network connection is good or not. What does ifconfig show? You should see an entry for eth0 and for lo. If only for lo, then you should run dhclient eth0 to activate your network connection (assuming you use DHCP).

I don't actually have that.
The output for 'ifconfig' is:

'Link encap:Local loopback
inet addr: 127. 'etc...' Mask:'etc...'
inet6addr: ::1/128 Scope:Host
RX Packets: 0 errors:0 dropped:0 overruns:0 'etc...'

My network connection is DHCP as far as I know.
Does that mean there's a problem with a network connection?

colorpurple21859 01-05-2015 07:37 PM

This may help http://www.debian.org/releases/stable/i386/apds03.html
Quote:

However, whilst the package was installing, I did read some error messages about not having relevant firmware.
The firmware you will need to install depends on your hardware. Maybe what is causing problems with internet connection. Add contrib and non-free to the end of each line in /etc/apt/sources.list then run update apt for nonfree and additional repositories. Then
Code:

apt-cache search firmware
will give a list of firmware packages available.

Higgsboson 01-06-2015 01:49 AM

Quote:

Originally Posted by colorpurple21859 (Post 5295945)

Thanks for your post. That is a good site for using debootstrap.
However, it is very complicated for me. It seems the debootstrap tutorial on this thread is a much simpler version. And replica9000 has tested it.

I did find on the debian site, it asks you to use a local mirror site. I was using
Code:

ftp.us.debian.org/debian/
but since I'm in the UK, I should be better off using
Code:

ftp.uk.debian.org/debian/
Quote:

The firmware you will need to install depends on your hardware. Maybe what is causing problems with internet connection. Add contrib and non-free to the end of each line in /etc/apt/sources.list then run update apt for nonfree and additional repositories. Then
Code:

apt-cache search firmware
will give a list of firmware packages available.
I'm not entirely sure how to do that.
I could run debootstrap and install onto a different partition on my hdd. I could then use the UK mirror for downloads. Then I could install debian 7.7 non-free rather than debian 7.7 stable. But I don't know how to substitute the following command for the non-free version:
Code:

debootstrap --include=linux-image-amd64,grub-pc --arch amd64 stable /mnt/deboot http://ftp.uk.debian.org/debian
Do I simply add 'stable_non_free' where it says 'stable'?
Will debian 7.7 non-free sort out my firmware problem, do you think?
Also, is trying the above method a viable option?

Higgsboson 01-06-2015 02:03 AM

The debian website also mentions

'D.3.4.4. Configure Networking' on their debootsrap tutorial. http://www.debian.org/releases/stable/i386/apds03.html

I'm wondering if I need to do something like that?

Head_on_a_Stick 01-06-2015 02:18 AM

@Higgsboson -- this is getting really silly now.

Just download an unofficial netinstall .iso with the non-free firmware included and install using the "normal" method (ie, burn the image to a CD and boot up from that):
http://ftp.acc.umu.se/mirror/cdimage...ding-firmware/

You seem intent on using debbootstrap (against all advice to the contrary) and then complain because it's "very complicated"...

If you had used the same method of installation that 99% of Debian users employ you would be using your Debian system by now rather than making countless posts on a support forum.
http://www.skidmore.edu/~pdwyer/e/eoc/help_vampire.htm

Higgsboson 01-06-2015 02:56 AM

Quote:

Originally Posted by Head_on_a_Stick (Post 5296088)
Just download an unofficial netinstall .iso with the non-free firmware included and install using the "normal" method (ie, burn the image to a CD and boot up from that):
http://ftp.acc.umu.se/mirror/cdimage...ding-firmware/

Yes, I have ordered some dvd r-w and will be making a cd netinstall soon.

Quote:

You seem intent on using debbootstrap (against all advice to the contrary) and then complain because it's "very complicated"...
Yes, but this is a thread about debootstrap - not cd neinstalls. Debian is offering more programs for people to use.
The programs will be a complete waste if nobody uses them. Their benefits never be understood.
I'm just trying to learn about the debootstrap program and see what benefits it can offer.

colorpurple21859 01-06-2015 05:28 AM

Quote:

Originally Posted by Higgsboson (Post 5296085)
The debian website also mentions

'D.3.4.4. Configure Networking' on their debootsrap tutorial. http://www.debian.org/releases/stable/i386/apds03.html

I'm wondering if I need to do something like that?

That is the reason I posted that website. If copying the /etc/network/interfaces from the host system isn't working maybe setting up static ip and/or copy /etc/resolv.conf from the host system will help, if your using a wired connection. Before you use wireless, firmware will have to be installed and extra configuration steps taken.

Quote:

However, it is very complicated for me. It seems the debootstrap tutorial on this thread is a much simpler version. And replica9000 has tested it.
It is if everything works. If not, then you got to pop the hood, as the saying goes, find out what is wrong and fix it. Which usually means using the command line and lots of googling.


All times are GMT -5. The time now is 02:12 AM.