Install Deepin without CD, bootable USB stick, using ISO-image of the hard disk!
Tofloor
poster avatar
makkon
deepin
2016-03-11 14:11
Author
Edited by makkon at 2016-3-12 13:51

How to install Deepin, using ISO-image of the hard disk using the Grub?
Grub2 from the beginning has learned to understand the ISO 9660 format and can load the operating system directly from the ISO-image, which is located on your hard disk!
1. Ubuntu  example:
/etc/grub.d/40_custom :
  1. menuentry "Ubuntu 14.04 (LTS) Live Desktop amd64" {
  2. set isofile="/boot/ubuntu-14.04-desktop-amd64.iso"
  3. loopback loop (hd0,1)$isofile
  4. linux (loop)/casper/vmlinuz  boot=casper iso-scan/filename=${isofile} quiet splash
  5. initrd (loop)/casper/initrd.lz
  6. }
Copy the Code
2.  Deepin         I created such a menu:
  1. menuentry "Linux Deepin Live" {
  2. loopback loop (hd1,2)/q/deepin.iso
  3. set root=(hd1,2)
  4.    linux (loop)/live/vmlinuz boot=live iso-scan/filename=/q/deepin.iso noeject noprompt --
  5.    initrd (loop)/live/initrd.lz
  6.    }
Copy the Code


2.1 Line 04 :  "boot=live" and further... how to make correctly?

Reply Favorite View the author
All Replies
makkon
deepin
2016-03-13 02:43
#1
Edited by makkon at 2016-3-13 04:23

Install Deepin using ISO-image solved. I mean, how quickly, simply !
Settings file add #  /etc/default/grub:
  1. # GRUB_DEFAULT=0
Copy the Code
Really config example /etc/grub.d/40_custom :

  1. menuentry "Linux Deepin" {
  2. set root=(hd0,2)
  3. set isofile=/q/deepin.iso
  4. loopback loop (hd0,2)${isofile}
  5. linux (loop)/live/vmlinuz boot=live iso-scan/ask_second_pass=true findiso=${isofile}
  6. initrd (loop)/live/initrd.lz
  7. }
Copy the Code
Attention, hd0- boot disk!  To make changes to the configuration the command is executed update-grub!
Derek Dai advises :  In case of your partition type is in gpt, replace (hd1,2) with (hd1,gpt2)

Downloaded from the menu live mode Deepin15 and  Deepin15.1, next successfully installed!
Live mode deepin-15.1.1-amd64 , deepin-15.1.1-i386 installed is fails after partitioning hdd.

Reply View the author
dailidu
deepin
2016-03-13 04:04
#2
Congratulation!
Reply View the author
makkon
deepin
2016-03-13 12:57
#3
Edited by makkon at 2016-3-13 04:28

Can you tell me setting so, that the installation took place in the mode without the GUI (not in live mode)?

Thank you for your understanding and support.




Reply View the author
dailidu
deepin
2016-03-13 20:32
#4
Since there is no CUI to help you automate the installing process, the only way to install Deepin without GUI is extract the content from filesystem.squashfs image (which is in live/ directory) from .iso.

First, prepare your new rootfs, eg
$ sudo mkfs.ext4 /dev/sda1
$ sudo mkdir /mnt/newroot
$ sudo mount /dev/sda1 /mnt/newroot

Mount deepin-15.1.iso
$ sudo mkdir /mnt/cdrom
$ sudo mount -o loop deepin-15.1.iso /mnt/cdrom

Extract content from filesystem.squashfs into /mnt/newroot
$ sudo apt-get install squashfs-tools
$ sudo unsquashfs -x -u -d /mnt/newroot -f /mnt/cdrom/live/filesystem.squashfs

Setup chroot environment in newroot/
$ sudo mount --bind /proc /mnt/newroot/proc
$ sudo mount --bind /dev /mnt/newroot/dev
$ sudo mount --bind /sys /mnt/newroot/sys
$ sudo mount -t tmpfs none /mnt/newroot/tmp
$ sudo cp /etc/resolv.conf /mnt/newroot/etc/

Run post-install scripts. Since the script will remove themselves, we have to make a copy and run from it
$ sudo cp -a /mnt/newroot/usr/share/deepin-installer/hooks/in_chroot/ /mnt/newroot/tmp

Update package information because post-install scripts will install more packages
$ sudo chroot /mnt/newroot apt-get update

Run post-install scripts
$ sudo chroot /mnt/newroot /bin/bash /usr/share/deepin-installer/hooks/before_chroot/31-get-screen-resolution.job
$ sudo chroot /mnt/newroot /bin/bash -c 'cd /tmp/in_chroot; for s in *; do bash $s; done'

If you were boot with legacy/BIOS mode, install grub-pc
$ sudo chroot /mnt/newroot apt-get install grub-pc

Refresh grub onto your boot sector
$ sudo chroot /mnt/newroot grub-install /dev/sda

Update grub.cfg
$ sudo chroot /mnt/newroot update-grub

Set your root password
$ sudo chroot /mnt/newroot passwd

Update /etc/fstab of newroot
$ echo '/dev/sda1        /        ext4        defaults        0        1' >/mnt/newroot/fstab
$ echo 'none        /tmp        tmpfs        defaults,nosuid,noexec        0        0' >>/mnt/newroot/fstab

Done, now you can boot into your newly installed Deepin.
Reply View the author
makkon
deepin
2016-03-14 04:07
#5
Edited by makkon at 2016-3-13 15:53

Hi dailidu !
Thanks for the comprehensive response! Very informative! You made my day! And one more question?
The default iso image Deepin 15 does not support live mode, as it was in Deepin 14. When we install Deepin15, using an ISO image of the hard disk, by default, presents live mode.  What to customize the menu in grub, so that the installation occurred in not live mode and as bootable USB? vmlinuz- [parameters]?

Thank you for your understanding and support.
Reply View the author
makkon
deepin
2016-03-14 17:44
#6
Install no live mode Deepin15.11  successfully installed, with parameters:
vmlinuz boot=live union=overlay livecd-installer  iso-scan/ask_second_pass=true findiso=${isofile}  splash --
Thank you for your understanding and support.
Reply View the author
jotapesse
deepin
2016-03-21 04:25
#7
https://bbs.deepin.org/post/30823
Since there is no CUI to help you automate the installing process, the only way to install Deepin wi ...

Hi @dailidu. I just wanted to say thank you for your tutorial. It helped me somewhat. Thanks! :-)
Reply View the author
laoguang
deepin
2016-03-21 05:32
#8
sounds like the os x recovery partition.
Reply View the author
dailidu
deepin
2016-03-24 01:56
#9
https://bbs.deepin.org/post/30823
Hi @dailidu. I just wanted to say thank you for your tutorial. It helped me somewhat. Thanks! :-)

Sorry for reply lately. Any time ;)
Reply View the author
New Thread

Popular Events

More
国际排名
WHLUG