LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-06-2015, 03:34 PM   #46
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649

Quote:
Originally Posted by Head_on_a_Stick View Post
No, you can't.

You could transfer it to a different USB stick though.

If you have a working Windows system, you can use the "USBWriter" utility to transfer the .iso:
http://sourceforge.net/p/usbwriter/wiki/Documentation/
The iso can be loaded to the hdd using unetbootin, but I don't believe it can be an iso already loade & bootable from the usb. What would work is a system that was loade by Wubi in a wins environment.
 
Old 01-06-2015, 09:44 PM   #47
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,324

Rep: Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578
Quote:
In the test I did yesterday, I used Mint 17.1. The /etc/network/interfaces file doesn't included entries for eth0. I'll have to update the OP later since copying that file won't be a reliable option.
Won't work if the host system is Slackware either.
 
Old 01-06-2015, 10:27 PM   #48
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by replica9000 View Post
I'm glad you're not giving up so easily, but using debootstrap is more for someone experienced building up a system with minimal tools included. Be glad you didn't try the variant=minbase option.



In the test I did yesterday, I used Mint 17.1. The /etc/network/interfaces file doesn't included entries for eth0. I'll have to update the OP later since copying that file won't be a reliable option.
It may be /etc/resolv.conf & /etc/interfaces which maybe listed under /mnt or /media which might need the uuid

Last edited by EDDY1; 01-06-2015 at 10:32 PM.
 
Old 01-06-2015, 10:56 PM   #49
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,324

Rep: Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578
To help Higgsboson out I continued over on the ops other thread. This installs the full gnome desktop with working internet after installing the base system. What it doesn't do is install grub, add-users, set time zone, and set locales.
http://www.linuxquestions.org/questi...5/#post5296741

Last edited by colorpurple21859; 01-06-2015 at 10:59 PM.
 
Old 01-10-2015, 07:05 AM   #50
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 50
I have had success with debootstrap in installing a debian stable release onto a hard disk partition without installing from cd-rom!
I now have dvd-rw discs to make a normall installation, but the optical drive is writing too fast. Also, for some reason my debian OS doesn't have debian-installer.
So rather than spending days finding out how to remedy the problem, I'd like to use debootstrap again.

I have the commands to use debootstrap set out below. It's the OP's original 'HOW-TO' modified for my situation. I don't really understand the commands but have a vague idea what it's doing. Can anyone please look through the source and advise if it's correct and in the right order? Many thanks.

1. Install debootstrap:
Code:
root@host# apt-get update
root@host# apt-get install debootstrap
2. Mount target partition to a mount point. The target partition (sda2) is already in ext4 format.
Code:
root@host# mkdir /mnt/deboot
root@host# mount /dev/sda2 /mnt/deboot
3. Install base system, kernel and bootloader. I'll be using a UK mirror site. Unfortunately, I have a Radeon 4200 sound card - so I'll need 'contrib' and 'non-free' versions of debian.
Code:
root@host# debootstrap --include=linux-image-amd64,grub-pc --arch amd64 stable main contrib nonfree  /mnt/deboot http://ftp.uk.debian.org/debian
4. Copy the mounted file systems table:
Code:
root@host# cp /etc/mtab /mnt/deboot/etc/mtab
5. Bind the virtual filesystems:
Code:
root@host# mount -o bind /dev /mnt/deboot/dev
root@host# mount -o bind /proc /mnt/deboot/proc
root@host# mount -o bind /sys /mnt/deboot/sys
6. Copy correct file onto install for network access. I needed to do this after the install but I'm not sure when to put in the command:
Code:
cp /etc/resolv.conf /mnt/etc/resolv.conf
7. Entering the chroot environment:
Code:
root@host# chroot /mnt/deboot /bin/bash
root@chroot# grub-install /dev/sda
root@chroot# update-grub

root@chroot# passwd
root@chroot# adduser <your-user-name>
root@chroot# getuuid=$(blkid | grep /dev/sda1 | awk 'match($0,/UUID/) {print substr($0,RSTART,100)}' | sed 's/"//g' | cut -d ' ' -f1) && echo "$getuuid / ext4 defaults 0 1" >> /etc/fstab
8. '(Optional) Give your install a name. If not, your new install won't have a name, or inherit the name of the host you are installing from':
Code:
root@chroot# echo "<name-your-host>" > /etc/hostname
9. 'Install a display manager and a window manager':
Code:
root@chroot# apt-get install xserver-xorg wdm fluxbox xterm
- or -
root@chroot# apt-get install xserver-xorg lightdm xfce4
It would be good here to know commands for different GUIs.

10.'Clean the package cache':
Code:
root@chroot# apt-get clean
root@chroot# exit
So now I should have a debian installation on sda2. I already have a distro on sda1 with GRUB bootloader.
So now I'm hoping GRUB will allow me to boot from sda2 so the new installation can begin.

Can anyone please say if the above is ok for a new install?
 
Old 01-10-2015, 11:13 AM   #51
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,105

Original Poster
Blog Entries: 2

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by Higgsboson View Post
3. Install base system, kernel and bootloader. I'll be using a UK mirror site. Unfortunately, I have a Radeon 4200 sound card - so I'll need 'contrib' and 'non-free' versions of debian.
Code:
root@host# debootstrap --include=linux-image-amd64,grub-pc --arch amd64 stable main contrib nonfree  /mnt/deboot http://ftp.uk.debian.org/debian
To add contrib and non-free, your command should look like this:
Code:
root@host# debootstrap --include=linux-image-amd64,grub-pc --components=main,contrib,non-free --arch amd64 stable /mnt/deboot http://ftp.uk.debian.org/debian


Quote:
Originally Posted by Higgsboson View Post
6. Copy correct file onto install for network access. I needed to do this after the install but I'm not sure when to put in the command:
Code:
cp /etc/resolv.conf /mnt/etc/resolv.conf
I'll be updating this soon. I'll probably leave an example of /etc/network/interfaces since copying it from the host may not work in a lot of cases. Using that file should work, but there could be other options of achieving the same result. For instance, you're installing stable, which is still using Sys-V init. Unstable should be installing systemd init by default. The host I used for the test the other day was using upstart init. Each might have it's own method of configuring network interfaces.



Quote:
Originally Posted by Higgsboson View Post
9. 'Install a display manager and a window manager':
Code:
root@chroot# apt-get install xserver-xorg wdm fluxbox xterm
- or -
root@chroot# apt-get install xserver-xorg lightdm xfce4
It would be good here to know commands for different GUIs.

Can anyone please say if the above is ok for a new install?
When I update it, I could add a couple more examples of installing desktop managers. Since you're interested in Gnome, this should get you a basic Gnome desktop. Also, this will install network-manager, which should configure your network for you.
Code:
apt-get install gdm3 gnome-shell gnome-terminal

Last edited by replica9000; 01-10-2015 at 11:39 AM. Reason: Additional info
 
1 members found this post helpful.
Old 01-10-2015, 11:48 AM   #52
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 50
Quote:
Originally Posted by replica9000 View Post
I'll be updating this soon. I'll probably leave an example of /etc/network/interfaces since copying it from the host may not work in a lot of cases. Using that file should work, but there could be other options of achieving the same result. For instance, you're installing stable, which is still using Sys-V init. Unstable should be installing systemd init by default. The host I used for the test the other day was using upstart init. Each might have it's own method of configuring network interfaces.
Wow, thanks for looking throught it, dude!

To make my target partition (sda2) bootable for GRUB, I've used Gparted and flagged it as a 'boot' partition.
 
Old 01-10-2015, 02:02 PM   #53
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
To make my target partition (sda2) bootable for GRUB, I've used Gparted and flagged it as a 'boot' partition.
It doesn't matter about boot flag if you just do "grub-install /dev/sda" it will install grub to the / partition but also make entry to MBR to point to your grub.
Depending on your system you may want to create a swap partition.

Last edited by EDDY1; 01-10-2015 at 02:05 PM.
 
Old 01-10-2015, 03:36 PM   #54
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 50
Quote:
Originally Posted by EDDY1 View Post
It doesn't matter about boot flag if you just do "grub-install /dev/sda" it will install grub to the / partition but also make entry to MBR to point to your grub.
Depending on your system you may want to create a swap partition.
Thanks dude. That's good to know. I read somewhere that it's easier just to have GRUB on each linux OS.

Swap files and swap partitions are certainly a good idea. I'm gonna have to find out a bit more and decide where to put them.
 
Old 01-10-2015, 03:43 PM   #55
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
It's easier to have only 1 grub & let it control everything.
Once you have grub installed any other OS can be added to debian's grub by running "update-grub"

Last edited by EDDY1; 01-10-2015 at 03:45 PM.
 
Old 01-10-2015, 06:40 PM   #56
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,324

Rep: Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578
For a complete desktop run one of the following depending on the preferred desktop:
tasksel --new-install install kde-desktop
tasksel --new-install install xfce-desktop
taslsel --new-install install gnome-desktop
tasksel --new-install install lxde-desktop
The network setup will take care of it's self when installing a full desktop.

Last edited by colorpurple21859; 01-10-2015 at 07:40 PM.
 
Old 01-10-2015, 10:44 PM   #57
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,324

Rep: Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578Reputation: 1578
I've been playing around with it some. Firmware has to be install if needed and the tasksel command for a full install with the best results is something similar to this after doing apt-get update:
Code:
tasksel --new-install install standard laptop gnome-desktop

Last edited by colorpurple21859; 01-10-2015 at 10:45 PM.
 
Old 01-10-2015, 11:16 PM   #58
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,105

Original Poster
Blog Entries: 2

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by colorpurple21859 View Post
I've been playing around with it some. Firmware has to be install if needed and the tasksel command for a full install with the best results is something similar to this after doing apt-get update:
Code:
tasksel --new-install install standard laptop gnome-desktop
Thanks for the info. I'll probably add it when I update the OP.
 
Old 01-11-2015, 10:37 AM   #59
Higgsboson
Member
 
Registered: Dec 2014
Location: UK
Distribution: Debian 8 Cinnamon/Xfce/gnome classic Debian live usb
Posts: 508

Rep: Reputation: 50
I have completed the install to my sda2 partition using debootstrap.
The install was successful and a debian OS is running- but there is a problem.

Originally, the GRUB boot menu would offer options to boot debian from sda1 and Windows from a seperate hdd in sdb1.
But now that I've installed a new debian distro in sda2 - I get a new GRUB menu which only offers the option to boot from sda2.
The options for sda1 and sdb1 have disappeared.

I tried update-grub and the output is:
Code:
update-grub
Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.2.0-4-amd64
Found initrd image: /boot/initrd.img-3.2.0-4-amd64
done
But the GRUB boot menu is unchanged and only sda2 can be accessed.

I used a live USB and removed the boot flag on sda2.
I then added a boot flag to sda1.
However, this has had no effect.

Does anyone know why GRUB isn't seeing the 2 distros on sda and the Windows on sdb?
 
Old 01-11-2015, 10:49 AM   #60
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,105

Original Poster
Blog Entries: 2

Rep: Reputation: 258Reputation: 258Reputation: 258
You could try installing os-prober. It's supposed to detect other OSes so Grub can add them to it's menu.
 
  


Reply

Tags
chroot, debian, debootstrap, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
chroot debian 32 bits on amd64 debootstrap error. mariogarcia Debian 2 02-23-2011 02:20 AM
Debian PPC Install errors (debootstrap, error 1) kdepa Debian 3 03-29-2007 06:27 AM
LXer: Installing Debian GNU/Linux using debootstrap LXer Syndicated Linux News 0 08-21-2006 10:21 AM
Debian install error /usr/lib/debootstrap/pkgdetails GT_Onizuka Debian 0 11-01-2005 01:11 AM
There have a error with debootstrap install debian cbz789 Debian 2 04-22-2005 06:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

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