Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Safest/easiest way to get Debian installed with W7

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
theprep
Posts: 3
Joined: 2011-08-26 14:46

Safest/easiest way to get Debian installed with W7

#1 Post by theprep »

I have used Wubi for Ubuntu, nice, easy and convenient. I have since deleted Wubi/Ubuntu. Exploring Debian, looking for a partition software that will safely create and allow me to install Debian next to W7. I am between machines, and this is my girlfriend's machine, so a full install is out.

User avatar
cthulhu
Posts: 304
Joined: 2009-09-07 12:34

Re: Safest/easiest way to get Debian installed with W7

#2 Post by cthulhu »

Well, there are only two options that I know of:
-Install Debian in parallel with W7, and dual boot.
-Use a live CD. There is a Debian Live CD project, you can google it.

But if you like Debian why not install it as a dual boot? How do you define "a full install is out"?

Doing a Wubi install of Ubuntu is not usually recommended since it can mess things up, in my opinion.

theprep
Posts: 3
Joined: 2011-08-26 14:46

Re: Safest/easiest way to get Debian installed with W7

#3 Post by theprep »

I cannot wipe 7 off, it's not my computer. Does the live disk give me the option to install alongside 7, after I have prepared/made a partition in W7? Dual boot, safe and easy, is what I am after. So the best method

So I would assume here:http://www.debian.org/CD/live/

If I decide I like Debian, I can go through with the install, it will allow me to select or create partitions to install Debian on? Select Gnome etc?

currysoup
Posts: 10
Joined: 2010-05-28 19:06

Re: Safest/easiest way to get Debian installed with W7

#4 Post by currysoup »

Safest way:
Use W7 to create a set of recovery media. Store these safely.
Defrag your girlfriends laptop.
Use clonezilla to image your girlfriends laptop hard disk to a removable drive.
Use the gParted live CD to shrink the W7 partition. It should still start at the beginning of the disk but leave free space afterwards.
Install Debian.

Windows updates may occasionally wipe out your MBR so make sure you keep an up to date copy of it somewhere.
To do this use

Code: Select all

dd if=/dev/sda of=/home/dave/MBR.512 bs=512 count=1 
to create it.
You will want to keep this on a USB stick with a copy of a live distro handy (gParted will do for this).
Use

Code: Select all

dd if=/home/dave/MBR.512 of=/dev/sda 
to restore it.

theprep
Posts: 3
Joined: 2011-08-26 14:46

Re: Safest/easiest way to get Debian installed with W7

#5 Post by theprep »

Thanks for the response. Very detailed, unfortunately I am without a back up drive, my Hitachi died. I think in the best interest of time, my relationship (ha) is to purchase an inexpensive laptop, and do the full install. My next purchase after that will be a PC to build a Linux digital audio workstation, still researching the best distro for that. Again, thank you for taking the time to respond.

User avatar
cthulhu
Posts: 304
Joined: 2009-09-07 12:34

Re: Safest/easiest way to get Debian installed with W7

#6 Post by cthulhu »

theprep wrote:I cannot wipe 7 off, it's not my computer. Does the live disk give me the option to install alongside 7, after I have prepared/made a partition in W7? Dual boot, safe and easy, is what I am after. So the best method

So I would assume here:http://www.debian.org/CD/live/

If I decide I like Debian, I can go through with the install, it will allow me to select or create partitions to install Debian on? Select Gnome etc?
You can use the official install CD (non-Live) and boot from that (if you like), and the install/setup process will begin. It lets you partition the disk, to allow dual boot with windows, and detects W7 and gives you, after completion, a dual boot screen when you start the computer.
Theoretically one should backup anything before a hard drive partition or OS install, but you should always have a backup anyway. :)

Also, during the installation/setup procedure, you choose if you want to install a Desktop Environment and which. Default is to do, and use Gnome, but you may choose KDE, LXDE, XFCE, or none.

I have no experience with the Debian Live-CD's, but I'm sure those will work as well.

axujen
Posts: 10
Joined: 2011-08-25 18:45

Re: Safest/easiest way to get Debian installed with W7

#7 Post by axujen »

word of advice if you gonna dual boot for the first time do it on your own computer.
lotta things can go wrong when trying to do a dualboot install and the chances of wiping your win partition are high

User avatar
Radvan
Posts: 123
Joined: 2009-06-22 09:38
Location: Prague, Czech Republic

Re: Safest/easiest way to get Debian installed with W7

#8 Post by Radvan »

(1) Notebooks often have an option "create recovery media". If you have a manual to your laptop then check whether the laptop has also such option.
(2) At any rate, backup the contents of HD somewhere. This should be possible from the winblows on the NB. The "create recovery media" does this in the most consistent way (with respect to a particular NB).
(3) Install winblows boot manager if it isn't installed already. Add winblows to it and reboot for a check. You should occur in the boot manager offering you winblows. Accept and finish startup.
(4) Do all partition manipulations from only one operating system. In your case, do all partition management from winblows. Defragment partitions, shrink a partition so that you get space for your Debian installation, and create partitions for your (future) root, /home and swap.
(5) Install Debian. Run "install" or "expert install". Avoid all "default", "quick" and similar offers. Do not manipulate partitions from Debian, only assign partitions to root, /home, etc., and format them. At FDISK screen (you will assign the partitions here) note which partition on which disk is your root (which partition you have assigned to root). You will need this info at the end of the installation, about a hour later :mrgreen:
Debian is winblows aware, you should pass.
(6) When you install GRUB (after installing everything else), decline installing GRUB in the MBR and install GRUB on the root partition. You will need to enter information "(hdX,Y)" where X is the ordinal of the HD (hd0 = the first disk, hd1 = the second disk, etc.) and Y is the ordinal of the root partition on the disk (see your notes from FDISK). (hd0,3) is the third partition on the first HD. You have in your FDISK notes "first disk, partition #3".
(7) Reboot. Winblows boot manager should boot, not Debian. Add the root partition to boot manager menu.
(8) Reboot. You should see both winblows and Debian in the boot manager menu and both should start.

P.S.: You'd better do something for cooling the NB when you install. You will install more than 1100 packages at once, many of them are big. If the cooling isn't enough good or the NB isn't enough new, then the installation can "crash" suddenly and the NB gets switched off. This wasn't a crash, this was overheating. I have experienced that.

Aris Veresie
Posts: 562
Joined: 2011-06-02 15:55
Location: Limassol, Cyprus

Re: Safest/easiest way to get Debian installed with W7

#9 Post by Aris Veresie »

You can also try installing on a usb stick if the computer can start with it. A 16GB will be more than adequate (you can also install in 8GB and possibly 4GB). This way you are not likely to damage the hard disk but you can always use the hard disk to store large data in.
Being anonymous is the same as being an idiot.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: Safest/easiest way to get Debian installed with W7

#10 Post by kiyop »

theprep wrote:I have used Wubi for Ubuntu, nice, easy and convenient.
I succeeded to boot debian Sid in an ext4-filesystem file in a NTFS partition like Wubi. :D

I had Sid installed in an ext4 partition with ntfs-3g and e2fsprogs.
I incorporated fuse and loop (EDIT: and ext4) modules into initramfs and set loaded by kernel.
I prepared a new NTFS partition with a label "ntfs1" by Gparted.
I made a 8.6GB file named "debianext4" by dd and made ext4-filesystem by mkfs.ext4 on the debianext4 file.
I booted with another linux distribution which can write to NTFS partition and can loop-mount ext4-filesystem file.
I mounted the NTFS partition and loop-mounted the debianext4 file.
I copied all the directories and all the files in / partition of the Sid into the loop-mounted debianext4.
I expanded the initramfs in debianext4 and changed init and script/local so that loop mount is enabled, referring the init and script/local in initramfs of Ubuntu Natty.
I made /host directory in debianext4.
I changed /etc/fstab in debianext4; changed device file name of root partition to /host/debianext4 and added mount option loop,rw.
I commented out the line in /etc/initramfs-tools/conf.d/resume.
I made kiyoshi's help by the Sid.
I booted with kiyoshi's help, mounted the NTFS partition and loop-mounted the debianext4 file and kexec'ed with the option:
--append="root=LABEL=ntfs1 loop=debianext4 ro"
and I finally succeeded in booting the debian sid from the file; debianext4 in the NTFS partition. :D

Tired. :wink:

I guess kernel update will rewrite the init and script/local in initramfs, thus will make the Sid unable to boot. :(
Then I must again rewrite init and script/local and make the cutomized initramfs.

And the above method is only for copying. Not for installation.

Edit again and again:
I succeeded in installing debian squeeze in and booting debian squeeze installed in an ext4-filesystem file in a NTFS partition. :D

Hereafter, I will show the detail method, so that newbie can do similarly.

The net installer I usually uses involves linux, and its kernel version is 2.6.32-5-486, thus I booted with Debian (maybe possible on Live CD/DVD) and downloaded linux-image-2.6.32-5-486_2.6.32-35_i386.deb

Code: Select all

$ su
TYPE ROOT PASSWORD IF ASKED.
# cd /
/# wget -c http://ftp.yz.yamagata-u.ac.jp/debian/pool/main/l/linux-2.6/linux-image-2.6.32-5-486_2.6.32-35_i386.deb
As you know, the words before first "#" or "$" means current directory and you need not type them nor the first "#" or "$".
And then,

Code: Select all

/# mkdir linux-image-486-dir
/# dpkg -X linux-image-2.6.32-5-486_2.6.32-35_i386.deb linux-image-486-dir
I mounted a NTFS partition (/dev/sda4) on /mnt with read/write mode and made an ext4-filesystem file (/ubuntu/disks/root.disk as in Wubi, this name is need not to be used to boot Debian from inside, but this name is convenient for kiyoshi's help).

Code: Select all

/# apt-get install ntfs-3g
/# mount -t ntfs-3g /dev/sda4 /mnt -o rw,umask=077
/# mkdir -p /mnt/ubuntu/disks
/# dd if=/dev/zero bs=2M count=4096 of=/mnt/ubuntu/disks/root.disk
/# mkfs.ext4 /mnt/ubuntu/disks/root.disk
I downloaded initrd.gz and expanded it.

Code: Select all

/# wget -c http://ftp.jaist.ac.jp/pub/Linux/Debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/initrd.gz
/# mkdir initrd
/# cd initrd
/initrd# gzip -dc ../initrd.gz|cpio -i
and search fuse.ko, ntfs.ko, loop.ko and ext4.ko from linux-image-486-dir, for example,

Code: Select all

/# find ../liux-image-486-dir -iname fuse.ko
and copied the found file into the corresponding directories I made, for example,

Code: Select all

/initrd# mkdir -p lib/modules/2.6.32-5-486/kenel/fs/fuse
/initrd# cp -a ../linux-image-486-dir/lib/modules/2.6.32-5-486/kernel/fs/fuse/fuse.ko lib/modules/2.6.32-5-486/kernel/fs/fuse/
Then, I regenerated a new initramfs

Code: Select all

/initrd# find .|cpio -H newc -o|gzip -9 > ../initrd.img-new
I rebooted and started kiyoshi's help and load linux and initrd.img-new and booted them. Installation started. I skipped "Partitioning" and entered into tty2(?) by pressing CTRL+ALT+F2, and I mounted the NTFS partition with the previously generated ext4-filesystem file.

Code: Select all

/# blkid # to know the device file name of the NTFS partition. In my case /dev/sda4
/# if [ ! -d /mnt ];then mkdir /mnt;fi
/# mount -t ntfs /dev/sda4 /mnt -o rw,umask=077
and made /target directory and loop-mounted the ext4-filesystem file on it.

Code: Select all

/# mkdir /target
/# mount -o loop,rw -t ext4 /mnt/ubuntu/disks/root.disk /target
I returned to installer-menu by pressing CTRL+ALT+F1 and selected "change debconf priority?" (I used Japanese in installation, so I do not know the menu in English) and changed the priority to medium and selected "install base system". Installer warned that partitioning has not been completed, but I selected "Return" twice, then successfully the installation continued, and I selected "Package selection?" and "installation of software". I checked only "standard system" at tasksel and skipped installation of boot loader. I selected "Finish Installation". Again, installer warned that partitioning has not been completed, but again I selected "Return". Then, a message showing that installation was completed and I selected "continue". System rebooted. I booted with squeeze in another partition (maybe possible with Live CD) and loop-mounted the ext4-filesystem file similarly by the above command on /testmount

Code: Select all

$ su
TYPE ROOT PASSWORD IF ASKED.
# cd /
# mount -t ntfs-3g /dev/sda4 /mnt -o rw
/# mkdir /testmount
/# mount -o loop,rw -t ext4 /mnt/ubuntu/disks/root.disk /testmount
and

Code: Select all

/testmount# mkdir host
/testmount# echo >>etc/initramfs-tools/modules "fuse
loop
ntfs
ext4"
/testmount# echo >>etc/modules  "fuse
loop
ntfs
ext4"
/testmount# cd ..
/# mount -o bind /dev /testmount/dev
/# mount -o bind /dev/pts /testmount/dev/pts
/# mount -o bind /sys /testmount/sys
/# mount -o bind /proc /testmount/proc
/# chroot ./testmount /bin/bash
/# update-initramfs -u
/# exit
/# cd testmount
/testmount# echo > etc/fstab "/host/ubuntu/disks/root.disk  /  ext4  loop,rw,relatime,errors-remount=ro,data=ordered  0  1
/dev/sda4  /host  ntfs  rw,umask=077  0  0"
/testmount# mkdir initrd
/testmount# cd initrd
/testmount/initrd# gzip -dc ../boot/initrd.img-2.6.32-5-686|cpio -i
/testmount/initrd# nano init
I added

Code: Select all

loop=*)
LOOP="${x#loop=}"
;;
loopflags=*)
LOOPFLAGS="-o ${x#loopflags=}"
;;
loopfstype=*)
LOOPFSTYPE="${x#loopfstype=}"
;;
after
for x in $(cat /proc/cmdline); do
case $x in
and saved by CTRL+o and finished nano by CTRL+x.
I executed

Code: Select all

/testmount/initrd# nano scripts/local
I changed if..fi to set roflag to

Code: Select all

roflag=-w
and added

Code: Select all

mkdir -p /host
mount -o move ${rootmnt} /host
if [ -z "${LOOPFSTYPE}" ]; then
eval $(fstype < "/host/${LOOP#/}")
else
FSTYPE="${LOOPFSTYPE}"
fi
if [ "$FSTYPE" = "unknown" ] && [ -x /sbin/blkid ]; then
FSTYPE=$(/sbin/blkid -s TYPE -o value "/host/${LOOP#/}")
[ -z "$FSTYPE" ] && FSTYPE="unknown"
fi
roflag=-w
modprobe loop
modprobe ${FSTYPE}
mount -w -o loop -t ${FSTYPE} ${LOOPFLAGS} "/host/${LOOP#/}" ${rootmnt}
if [ -d ${rootmnt}/host ]; then
mount -o move /host ${rootmnt}/host
fi
after
# Mount root
if [ "${FSTYPE}" != "unknown" ]; then
mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt}
else
mount ${roflag} ${ROOTFLAGS} ${ROOT} ${rootmnt}
fi
and saved by CTRL+o and finished nano by CTRL+x.

Code: Select all

/testmount/initrd# cd ..
/testmount# wget -c http://ftp.yz.yamagata-u.ac.jp/debian/pool/main/n/ntfs-3g/libntfs-3g75_2010.3.6-1_i386.deb
/testmount# mkdir libntfs_dir
/testmount# dpkg -X libntfs-3g75_2010.3.6-1_i386.deb libntfs_dir
/testmount# cp -a libntfs_dir/*  initrd/ # only usr/lib/libntfs-3g.so.75* seems to be needed in this version.
/testmount# wget -c http://ftp.yz.yamagata-u.ac.jp/debian/pool/main/n/ntfs-3g/ntfs-3g_2010.3.6-1_i386.deb
/testmount# mkdir ntfs3g_dir
/testmount# dpkg -X ntfs-3g_2010.3.6-1_i386.deb ntfs3g_dir
/testmount# cp -a ntfs3g_dir/*  initrd/
/testmount# wget -c http://ftp.yz.yamagata-u.ac.jp/debian/pool/main/e/eglibc/libc6-i686_2.11.2-10_i386.deb
/testmount# mkdir libc6_dir
/testmount# dpkg -X libc6-i686_2.11.2-10_i386.deb libc6_dir
/testmount# cp -a libc6_dir/*  initrd/ # only lib/i686/cmov/libpthread.so.0 may be OK, although I am not sure.
/testmount# cd initrd
/testmount/initrd# find . |cpio -H newc -o|gzip -9 > ../initrd.img-new
/testmount/initrd# mv ../boot/initrd.img-2.6.32-5-686 ../boot/initrd.img-2.6.32-5-686-backup
/testmount/initrd# mv ../initrd.img-new ../boot/initrd.img-2.6.32-5-686
/testmount/initrd# cd ../..
/# umount -l testmount
/# umount -l /mnt
I rebooted by

Code: Select all

/# shutdown -r now
and booted kiyoshi's help and selected the NTFS partition and kiyoshi's help found the root.disk and pressing ENTER again and again successfully booted the debian squeeze installed in the ext4-filesystem file in the NTFS partition.

I will make a script which can automatically do what I have done.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Post Reply