انجمن‌های فارسی اوبونتو

لطفاً به انجمن‌ها وارد شده و یا جهت ورود ثبت‌نام نمائید

لطفاً جهت ورود نام کاربری و رمز عبورتان را وارد نمائید

نویسنده موضوع: نصب Debian Debootstrap (حل شد)  (دفعات بازدید: 10838 بار)

0 کاربر و 1 مهمان درحال مشاهده موضوع.

آفلاین norouzi90

  • Hero Member
  • *
  • ارسال: 868
  • جنسیت : پسر
  • Debian 13
پاسخ : نصب Debian Debootstrap
« پاسخ #120 : 10 آبان 1404، 10:04 ب‌ظ »
اصلاحیه:

من با دقت بیشتری برخی موارد را دوباره و دوباره بررسی کردم.
در اکثر موارد مربوطه، درست می باشند، ولی موارد مربوط به plymouth نیاز به توضیحات تکمیلی و انجام برخی اصلاحات دارند.

OpenRC :

بعد از نصب دبیان به‌صورت Debootstrap در حالت OpenRC ، نه در هنگام boot و نه در هنگام shutdown ، صفحه مربوط به plymouth ظاهر نمی شود و در هنگام بوت خطای زیر داده می شود:

ERROR: plymouth failed to start

راهکار اول:
با اضافه کردن آپشن  splash به فایل etc/default/grub/ ، به‌صورت زیر:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
و سپس اجرای دستور  update-grub و سپس reboot کردن سیستم ، این حالت رخ می دهد:

- در هنگام boot ، صفحه plymouth نشان داده می شود.

- در هنگام boot ، خطای مربوط به plymouth ، همچنان وجود دارد.

- در هنگام shutdown ، صفحه plymouth نشان داده نمی شود.

راهکار دوم:
برای رفع خطای ERROR: plymouth failed to start ، قبلاً 9 دستور برای رفع این خطا انجام می دادم،یعنی بصورت:

# OpenRC
sudo rc-service plymouth stop
sudo rc-update del plymouth default
sudo rc-update del plymouth boot
sudo rc-update del plymouth shutdown
sudo rc-update del plymouth sysinit
sudo rc-update del plymouth-log sysinit
sudo rc-update -u


# SysV
sudo update-rc.d -f plymouth remove
sudo update-rc.d -f plymouth-log remove

ولی با انجام تست های مجدد، فهمیدم که تنها دو تا از این دستورات مؤثر بوده است و نیاز به اجرای بقیه دستورات برای رفع این خطا وجود ندارد.دو تا دستور مؤثر عبارت از:

sudo update-rc.d -f plymouth remove
sudo update-rc.d -f plymouth-log remove

با اجرای این دو تا دستور به‌همراه راهکار اول ، این حالت رخ می دهد:

- در هنگام boot ، صفحه plymouth نشان داده می شود. که درست است.

- در هنگام boot ، خطای مربوط به plymouth ، دیگر وجود ندارد. که درست است.

- در هنگام shutdown ، صفحه plymouth نشان داده نمی شود.این مورد حل نشد.


###############################################################
###############################################################

SysV :
بعد از نصب دبیان به‌صورت Debootstrap در حالت SysV ، نه در هنگام boot و نه در هنگام shutdown ، صفحه مربوط به plymouth ظاهر نمی شود و در هنگام بوت خطای زیر داده می شود: عکس 1

!startpar: service(s) returned failure: plymouth...failed

راهکار اول:
با اضافه کردن آپشن  splash به فایل etc/default/grub/ ، به‌صورت زیر:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
و سپس اجرای دستور  update-grub و سپس reboot کردن سیستم ، این حالت رخ می دهد:

- در هنگام boot ، صفحه plymouth نشان داده می شود. که درست است.

- در هنگام boot ، خطای مربوط به plymouth ، همچنان وجود دارد. که اشکال دارد.

- در هنگام shutdown ، صفحه plymouth نشان داده می شود. که درست است.

راهکار دوم:

برای رفع خطای

!startpar: service(s) returned failure: plymouth...failed

باز هم از این دو تا دستور استفاده کردم:

sudo update-rc.d -f plymouth remove
sudo update-rc.d -f plymouth-log remove

با اجرای این دو تا دستور به‌همراه راهکار اولی ، این حالت رخ می دهد:

- در هنگام boot ، صفحه plymouth نشان داده می شود. که درست است.

- در هنگام boot ، خطای مربوط به plymouth ، دیگر وجود ندارد. که درست است.

- در هنگام shutdown ، صفحه plymouth نشان داده نمی شود.که درست نیست.

نتیجه نهایی:

در OpenRc ، با این راهکارها می شود  صفحه مربوط به plymouth را در هنگام بوت نشان داده شود و خطای مربوط به plymouth حل شود ولی راهکاری پیدا نکردم که بتوانم در OpenRC ،  صفحه مربوط به plymouth را در هنگام shutdown بیاورم.

در SysV به‌طور کلی دو حالت مجزا پیش می آید یا :

حالت اول: صفحه مربوط به plymouth هم در boot و هم در shutdown نشان داده می شود، ولی خطای مربوط به plymouth در هنگام boot همچنان باقی می ماند.(یعنی راهکار اول)
 
حالت دوم: صفحه مربوط به plymouth فقط در هنگام boot نشان داده می شود ولی در  هنگام shutdown نشان داده نمی شود، ولی خطای مربوط به plymouth در هنگام boot حل شد.(یعنی راهکار اول بعلاوه راهکار دوم)

که هر دو راهکار ناقص هستند.

آفلاین norouzi90

  • Hero Member
  • *
  • ارسال: 868
  • جنسیت : پسر
  • Debian 13
پاسخ : نصب Debian Debootstrap
« پاسخ #121 : 11 آبان 1404، 03:56 ب‌ظ »
با سلام مجدد،

من الان بر روی نصب دبیان بصورت Debootstrap به حالت Runit کار می کنم.

در مرحله ای از مراحل نصب می خواهم تنها وابستگی های lightdm نصب شوند و خود lightdm نصب نشود. آیا دستوری وجود دارد که بجای دستور:

apt install lightdm
بکار ببرم، بشرطی که خود lightdm نصب نشود و تنها وابستگی های مرتبط با بسته lightdm نصب گردند؟

آفلاین Chappie

  • Full Member
  • *
  • ارسال: 125
  • جنسیت : پسر
پاسخ : نصب Debian Debootstrap
« پاسخ #122 : 12 آبان 1404، 01:20 ق‌ظ »
خودِ APT سوییچ «فقط وابستگی‌ها را نصب کن ولی خود بسته را نصب نکن» ندارد.
یک اسکریپت بش براتون آماده کردم که این بسته lightdm رو فقط وابستگی هاش رو نصب میکنه .
خود اسکریپت رو میتونید ویرایش کنید و خط زیر رو تغییر بدید برای هر بسته ای که میخواید :
pkg="lightdm"اسکریپت رو اجرایی کنید :
chmod +x deps-only.txt
./deps-only.txt
What is the Internet?
It's a thing in a computer. Lets you look up shit you don't know.
I want it! I want that Internet.

آفلاین norouzi90

  • Hero Member
  • *
  • ارسال: 868
  • جنسیت : پسر
  • Debian 13
پاسخ : نصب Debian Debootstrap
« پاسخ #123 : 12 آبان 1404، 08:14 ب‌ظ »
بازهم ممنون آقای Chappie ، خیلی زحمت کشیدید.

 البته بهتر دیدم که توضیحی در این باره بدهم. که چرا این سؤال را اصلاً مطرح کردم.
 دبیان را با هم بصورت Debootstrap نصب کردیم، دفعات قبل systemd و SysV و OpenRC را نصب کرده بودیم، ایندفعه خواستم Runit را نصب کنم.
مثل همیشه می خواستم ار lightdm به‌عنوان display manager استفاده کنم ولی بعد از اتمام نصب و reboot کردن، بعد از صفحه گراب و بعد از لاگ های بوت، در جایی که بایستی وارد صفحه lightdm برای لاگین کاربر می شد، اینکار صورت نگرفت. از gdm3 و همچنین sddm استفاده کردم ولی مشکل همچنان پابرجا بود یا وارد صفحه لاگین کاربر نمی شد، یا خود صفحه لاگین دچار مشکل می شد مثلاً کمرنگ بود یا گزینه ها عمل نمی کرد یا به سختی وارد صفحه کاربر می شد و عمل لود بسختی انجام می شد. دقیقاً نمی دانم مشکل از کجا بود.
ولی وقتی از xdm یا slim یا dwm استفاده می کردم، می شود گفت مشکلی نبود.
ولی وابستگی  های نصب lightdm  شکل 1 با xdm  شکل 2 یا slim شکل 3 خیلی متفاوت بود.
مثلاً xdm و یا slim ، بسته های وابستگی کافی با بسته خودشان برای نصب ندارند تا محیط گرافیکی نصب بشود.
بنابراین فکری به ذهنم رسید که lightdm  را با تمام وابستگی ها یش ولی بدون خودش را نصب کنم ولی بعد بیایم xdm را نصب کنم.
راهکار شما در سطح خودش واقعاً بی نظیر است، ولی برای اینکه من در راهنمای نصب استفاده کنم تا دیگران دبیان را به‌صورت debootstrap و برای Runit استفاده کند با توجه به راهنماهای قبلی ام برای init های دیگر جور در نمی آمد، البته مشکل از شما نبود و من در ارسالی قبلی دقیق توضیح نداده بودم که چه مشکلی دارم.
 بنابراین بنظرم فکر دیگری آمد که علاوه بر xdm بیایم و بسته xserver-xorg (شکل 4) را نصب کنم، که خوشبختانه با این بسته کلی از وابستگی های موردنظرم از lightdm نصب شد و دیگر نیازی به استفاده از lightdm نبود.
بهر حال از وقتی که گذاشتید سپاسگزارم.


آفلاین norouzi90

  • Hero Member
  • *
  • ارسال: 868
  • جنسیت : پسر
  • Debian 13
پاسخ : نصب Debian Debootstrap
« پاسخ #124 : دیروز ساعت 10:15 ق‌ظ »
 آقای Ian LeCorbeau ، چند سال قبل برای نصب Runit (و سایر init ها) نوشته ای داشتند، البته فکر کنم در آن نوشته منظورشان این بود که سیستم دبیان حاوی systemd را به Runit تبدیل کنند، هر چند که ایشان می گویند بهترین راه استفاده از Debootstrap برای اینکار است نه این نوع روش، بهر حال نوشته ایشان در قسمت Runit به این صورت بود:

# Runit

Switching to Runit requires a few more steps. Take note that this is the one I have tested the least, which is ironic considering it’s the first one I ever tried (during the Buster days).

$ sudo apt install runit-systemd

(this is a transitional package meant to make the switch easier, I'm not sure this step is still required, but I did it anyway to avoid trouble)

$ sudo reboot

$ sudo apt install runit runit-run

(You will be told that what you're about to do can cause problems, and in order to continue, type 'Yes, do as I say!' (without the quotes)).

$ sudo reboot

$ sudo apt install elogind libpam-elogind orphan-sysvinit-scripts systemctl procps

$ sudo reboot

You can now uninstall runit-systemd.

$ sudo apt remove runit-systemd


 در آنجا برای نصب Runit ، دو بسته را معرفی کرده :

runit و  runit-run

البته این نوشتجاتش مال چند سال قبل است، و فکر کنم که تمرکز ایشان در اینگونه موارد، اگر اشتباه نکرده باشم، بیشتر  روی Debootstrap  و  sysvinit می باشد.
در هر صورت ،از این دو بسته من با نصب  بسته runit-run موافق نبودم به‌دلیل زیر:

runit is a collection of tools to provide system-wide service supervision
and to manage services.  Contrary to sysv init, it not only cares about
starting and stopping services, but also supervises the service daemons
while they are running.  Amongst other things, it provides a reliable
interface to send signals to service daemons without the need for pid-files,
and a log facility with automatic log file rotation and disk space limits.

runit service supervision can run under sysv init, systemd or replace the init
system completely. Complete init replacement is provided by 'runit-init'
package. Users that want to take advantage of runit supervision under systemd
or sysv init can directly install the 'runit-run' package.

نقل‌قول
runit مجموعه‌ای از ابزارها برای ارائه نظارت بر سرویس در سطح سیستم و مدیریت سرویس‌ها است. برخلاف sysv init، این ابزار نه تنها به شروع و توقف سرویس‌ها اهمیت می‌دهد، بلکه بر سرویس‌های سرویس نیز در حین اجرا نظارت می‌کند. در میان چیزهای دیگر، یک رابط قابل اعتماد برای ارسال سیگنال به سرویس‌های سرویس بدون نیاز به فایل‌های pid و یک امکان ثبت وقایع با چرخش خودکار فایل‌های گزارش و محدودیت‌های فضای دیسک فراهم می‌کند.

نظارت بر سرویس runit می‌تواند تحت sysv init، systemd اجرا شود یا سیستم init را به طور کامل جایگزین کند. جایگزینی کامل init توسط بسته 'runit-init' ارائه می‌شود. کاربرانی که می‌خواهند از نظارت runit تحت systemd یا sysv init بهره‌مند شوند، می‌توانند مستقیماً بسته 'runit-run' را نصب کنند.

همانطور که اینجا نوشته من می خواستم که Runit به‌طور مستقل کار کند و نه به systemd وابسته باشد و نه به sysv init .
بنابراین من بایستی بسته runit-init را نصب می کردم.
و اگر شما بخواهید از نظارت runit تحت systemd یا sysv init بهره‌مند شوید، می‌توانید مستقیماً بسته 'runit-run' را نصب کنید.
من علاوه بر بسته  runit-init ، بسته runit-services را نصب کردم.

بسته runit-services :

runit is a replacement for SysV-init and other init schemes.  It runs on
Debian GNU/Linux, *BSD, MacOSX, and Solaris, and may be easily adapted
to other Unix operating systems.  runit implements a simple three-stage
concept.  Stage 1 performs the system's one-time initialization tasks.
Stage 2 starts the system's uptime services (via the runsvdir program).
Stage 3 handles the tasks necessary to shutdown and halt or reboot.

This package contains services directories for a collection of services
available in Debian, to have them run under runit service supervision
instead of sysvinit or systemd. Services directories are installed under
/usr/share/runit/sv/. Local copies of services can be maintained easily
in /etc/sv/ with the cpsv utility that can be used to copy, inspect and
update runscripts in /etc/sv/ after the first installation.

نقل‌قول
runit جایگزینی برای SysV-init و سایر طرح‌های init است. این برنامه روی Debian GNU/Linux، *BSD، MacOSX و Solaris اجرا می‌شود و به راحتی با سایر سیستم عامل‌های یونیکس سازگار می‌شود. runit یک مفهوم سه مرحله‌ای ساده را پیاده‌سازی می‌کند. مرحله 1 وظایف اولیه‌سازی یک‌باره سیستم را انجام می‌دهد. مرحله 2 سرویس‌های uptime سیستم را (از طریق برنامه runsvdir) شروع می‌کند. مرحله 3 وظایف لازم برای خاموش کردن و متوقف کردن یا راه‌اندازی مجدد را انجام می‌دهد.

این بسته شامل دایرکتوری‌های سرویس برای مجموعه‌ای از سرویس‌های موجود در Debian است تا آنها را تحت نظارت سرویس runit به جای sysvinit یا systemd اجرا کند. دایرکتوری‌های سرویس در /usr/share/runit/sv/ نصب می‌شوند. کپی‌های محلی سرویس‌ها را می‌توان به راحتی در /etc/sv/ با ابزار cpsv که می‌تواند برای کپی، بررسی و به‌روزرسانی اسکریپت‌های اجرا در /etc/sv/ پس از اولین نصب استفاده شود، نگهداری کرد.

###############################################

در مورد استفاده از lightdm به‌عنوان display manager با مشکل مواجه شدم ولی به‌طور تجربی متوجه شدم xdm سازگاری خوبی با Runit دارد، بنابراین از این display manager استفاده کردم.
اگر xdm را دوست ندارید می توانید از slim یا dwm استفاده کنید.

###############################################

برخلاف SysV و OoenRC در Runit دیگر نیازی به‌کارگیری دستور mkdir /etc/inittab.d نبود.


###############################################

برخلاف SysV و OoenRC در Runit ، در هنگام نصب با به‌کارگیری دستور umount  /dev/sda3 ، کمی با مشکل target is busy مواجه شدم (عکس 1)، با به‌کارگیری آپشن l- این مشکل حل شد، یعنی به‌صورت:

root@debian:~# umount -l /dev/sda3
###############################################

برخلاف SysV و OoenRC در Runit ، در هنگام بوت سیستم نصب شده دیگر خطایی از جانب plymouth و apparmor دیگر وجود نداشت.
ولی من بالشخصه از plymouth استفاده نمی کنم، بیشتر دوست دارم، ببینم که لاگ های boot و shutdown چه می گویند.
و اینهمه برای plymouth و apparmor در ارسالی های قبلی برای init های دیگر کار کردم، می خواستم دوستانی که مایل به استفاده از این ها باشند، سیستم بی نقص تری داشته باشند.

###############################################

عکس 2 و 3 از بوت
عکس 4 و 5 مربوط به محیط کاری
عکس 6 و 7 مربوط به shutdown سیستم، که به‌علت سرعت بالا در این init ، همین را هم به زور گرفتم.
« آخرین ویرایش: دیروز ساعت 10:23 ق‌ظ توسط norouzi90 »

آفلاین norouzi90

  • Hero Member
  • *
  • ارسال: 868
  • جنسیت : پسر
  • Debian 13
پاسخ : نصب Debian Debootstrap
« پاسخ #125 : دیروز ساعت 10:27 ق‌ظ »
ادامه عکس ها.

آفلاین norouzi90

  • Hero Member
  • *
  • ارسال: 868
  • جنسیت : پسر
  • Debian 13
پاسخ : نصب Debian Debootstrap
« پاسخ #126 : دیروز ساعت 12:33 ب‌ظ »
خلاصه این موضوع در یکجا با ویرایش :

Install+Debian 13+Debootstrap+systemd+minimal+the Arch way  :

#######################Install+Debian 13+Debootstrap+systemd+minimal+the Arch way##########################
###########################################################################################################
##### This is how my system partitioning is, you can change them according to your system partitioning.####
##### /dev/sda1 for efi, /dev/sda2 for swap, /dev/sda3 for root, /dev/sda4 for home########################
##### You must use the Debian live distribution.###########################################################
###########################################################################################################
##### Before you run these commands, you should first partition your hard drive, for example with gparted.#
##### The mkfs commands used here are only for formatting the desired partition, not for creating it.######
##### For example, we formatted the partition with mkfs to ext4 or fat 32.#################################
###########################################################################################################
##### In the following commands, replace yourhostname with your desired host name and yourusername ########
##### with your desired username.##########################################################################
###########################################################################################################
##### On the command line, be sure to note the difference between user@debian:~$ and ######################
##### root@debian:~# and root@debian:/#, which represent completely different paths.#######################
##### #####################################################################################################
##### you need to decide if you want sudo or doas in order to elevate your user’s privileges for###########
##### updates, etc… This is your choice.Debian provides a pre-configured sudoers file, and you ############
##### probably don’t need to change anything, but it’s wise to verify that the line #######################
##### under “allow members of group sudo …” is not commented out with the cat /etc/sudoers command.########
##### Look at the output, and if the line is commented out, use the visudo command and uncomment it.#######
###########################################################################################################



user@debian:~$ sudo apt install tmux

user@debian:~$ tmux

user@debian:~$ sudo su -
root@debian:~#

root@debian:~# apt update && apt install debootstrap arch-install-scripts -y

root@debian:~# mkfs.fat -F 32 /dev/sda1

root@debian:~# mkswap /dev/sda2

root@debian:~# swapon /dev/sda2

root@debian:~# mkfs.ext4 /dev/sda3

root@debian:~# mkfs.ext4 /dev/sda4

root@debian:~# mount /dev/sda3 /mnt

root@debian:~# mkdir -p /mnt/{boot,home}

root@debian:~# mount /dev/sda4 /mnt/home

root@debian:~# mkdir -p /mnt/boot/efi

root@debian:~# mount /dev/sda1 /mnt/boot/efi

root@debian:~# mount | grep sda

root@debian:~# ls  /usr/share/debootstrap/scripts/

root@debian:~# /usr/sbin/debootstrap  --variant=minbase --include=vim  trixie  /mnt  http://deb.debian.org/debian/

root@debian:~# genfstab -U /mnt >> /mnt/etc/fstab

root@debian:~# echo deb http://deb.debian.org/debian trixie main contrib non-free-firmware non-free > /mnt/etc/apt/sources.list

root@debian:~# echo deb http://deb.debian.org/debian-security trixie-security main contrib non-free-firmware non-free >> /mnt/etc/apt/sources.list

root@debian:~# echo deb http://deb.debian.org/debian/ trixie-updates main contrib non-free-firmware non-free >> /mnt/etc/apt/sources.list
 
root@debian:~# arch-chroot /mnt
root@debian:/#

root@debian:/# apt update

root@debian:/# apt install systemd systemd-sysv libpam-systemd libsystemd0

root@debian:/# apt install linux-image-amd64

root@debian:/# dpkg-reconfigure tzdata

root@debian:/# apt install network-manager

root@debian:/# echo "yourhostname" > /etc/hostname


root@debian:/#  echo "127.0.0.1       localhost yourhostname" > /etc/hosts
root@debian:/# echo  "::1             localhost ip6-localhost ip6-loopback" >> /etc/hosts
root@debian:/# echo "fe00::0         ip6-localnet" >> /etc/hosts
root@debian:/# echo "ff00::0         ip6-mcastprefix" >> /etc/hosts
root@debian:/# echo "ff02::1         ip6-allnodes"  >>  /etc/hosts
root@debian:/# echo "ff02::2         ip6-allrouters" >> /etc/hosts

root@debian:/# apt install locales

root@debian:/# dpkg-reconfigure locales

root@debian:/# apt install console-setup

root@debian:/# dpkg-reconfigure keyboard-configuration

root@debian:/# passwd

root@debian:/# useradd -m yourusername

root@debian:/# passwd yourusername

root@debian:/# usermod -aG cdrom,floppy,audio,dip,video,plugdev,netdev yourusername

root@debian:/# usermod -s /bin/bash yourusername

root@debian:/# apt install sudo

root@debian:/# usermod -aG sudo yourusername

root@debian:/# cat /etc/sudoers

root@debian:/# apt install e2fsprogs

root@debian:/# apt install firmware-linux

root@debian:/# apt install grub-efi-amd64

root@debian:/# grub-install --target=x86_64-efi --efi-directory=/boot/efi

root@debian:/# update-grub

root@debian:/# apt clean

root@debian:/# exit

root@debian:~# rm /mnt/etc/resolv.conf

root@debian:~# umount /dev/sda1

root@debian:~# umount /dev/sda4

root@debian:~# umount /dev/sda3

root@debian:~# reboot

########################################################################################################################
########################################################################################################################

#################################################################################################################


Install+Debian 13+Debootstrap+SysV+MATE Desktop+the Arch way   :

#######################Install+Debian 13+Debootstrap+SysV+MATE Desktop+the Arch way########################
###########################################################################################################
##### This is how my system partitioning is, you can change them according to your system partitioning.####
##### /dev/sda1 for efi, /dev/sda2 for swap, /dev/sda3 for root, /dev/sda4 for home #######################
##### You must use the Debian live distribution.###########################################################
###########################################################################################################
##### Before you run these commands, you should first partition your hard drive, for example with gparted.#
##### The mkfs commands used here are only for formatting the desired partition, not for creating it.######
##### For example, we formatted the partition with mkfs to ext4 or fat 32.#################################
###########################################################################################################
##### In the following commands, replace yourhostname with your desired host name and yourusername ########
##### with your desired username.##########################################################################
###########################################################################################################
##### On the command line, be sure to note the difference between user@debian:~$ and ######################
##### root@debian:~# and root@debian:/#, which represent completely different paths.#######################
##### #####################################################################################################
##### you need to decide if you want sudo or doas in order to elevate your user’s privileges for###########
##### updates, etc… This is your choice.Debian provides a pre-configured sudoers file, and you ############
##### probably don’t need to change anything, but it’s wise to verify that the line #######################
##### under “allow members of group sudo …” is not commented out with the cat /etc/sudoers command.########
##### Look at the output, and if the line is commented out, use the visudo command and uncomment it.#######
###########################################################################################################
#####I am installing the Mate desktop here, but you can install another desktop according to your taste.###
###########################################################################################################
#####I am installing the lightdm display manager here, but you can install another display manager#########
#####according to your taste.##############################################################################
###########################################################################################################



user@debian:~$ sudo apt install tmux

user@debian:~$ tmux

user@debian:~$ sudo su -
root@debian:~#

root@debian:~# apt update && apt install debootstrap arch-install-scripts -y

root@debian:~# mkfs.fat -F 32 /dev/sda1

root@debian:~# mkswap /dev/sda2

root@debian:~# swapon /dev/sda2

root@debian:~# mkfs.ext4 /dev/sda3

root@debian:~# mkfs.ext4 /dev/sda4

root@debian:~# mount /dev/sda3 /mnt

root@debian:~# mkdir -p /mnt/{boot,home}

root@debian:~# mount /dev/sda4 /mnt/home

root@debian:~# mkdir -p /mnt/boot/efi

root@debian:~# mount /dev/sda1 /mnt/boot/efi

root@debian:~# mount | grep sda

root@debian:~# ls  /usr/share/debootstrap/scripts/

root@debian:~# /usr/sbin/debootstrap  --variant=minbase --include=vim  trixie  /mnt  http://deb.debian.org/debian/

root@debian:~# genfstab -U /mnt >> /mnt/etc/fstab

root@debian:~# echo deb http://deb.debian.org/debian trixie main contrib non-free-firmware non-free > /mnt/etc/apt/sources.list

root@debian:~# echo deb http://deb.debian.org/debian-security trixie-security main contrib non-free-firmware non-free >> /mnt/etc/apt/sources.list

root@debian:~# echo deb http://deb.debian.org/debian/ trixie-updates main contrib non-free-firmware non-free >> /mnt/etc/apt/sources.list
 
root@debian:~# arch-chroot /mnt
root@debian:/#

root@debian:/# apt update

root@debian:/# apt install sysvinit-core sysv-rc orphan-sysvinit-scripts elogind libpam-elogind

root@debian:/# apt-mark hold systemd systemd-sysv  libpam-systemd

root@norouzi:~# cat > /etc/apt/preferences.d/nosystemd << "EOF"
> Package: systemd
> Pin: release *
> Pin-Priority: -1
>
> Package: systemd-sysv
> Pin: release *
> Pin-Priority: -1
>
> Package: libpam-systemd
> Pin: release *
> Pin-Priority: -1
> EOF
root@debian:/#

root@norouzi:~# apt-mark showhold

root@debian:/# apt install linux-image-amd64

root@debian:/# dpkg-reconfigure tzdata

root@debian:/# apt install network-manager

root@debian:/# echo "yourhostname" > /etc/hostname

root@debian:/# echo "127.0.0.1       localhost" > /etc/hosts
root@debian:/# echo "127.0.1.1       yourhostname" >> /etc/hosts     
root@debian:/# echo "::1             localhost ip6-localhost ip6-loopback" >> /etc/hosts
root@debian:/# echo "fe00::0         ip6-localnet" >> /etc/hosts
root@debian:/# echo "ff00::0         ip6-mcastprefix" >> /etc/hosts
root@debian:/# echo "ff02::1         ip6-allnodes"  >>  /etc/hosts
root@debian:/# echo "ff02::2         ip6-allrouters" >> /etc/hosts

root@debian:/# apt install locales

root@debian:/# dpkg-reconfigure locales

root@debian:/# apt install console-setup

root@debian:/# dpkg-reconfigure keyboard-configuration

root@debian:/# passwd

root@debian:/# useradd -m yourusername

root@debian:/# passwd yourusername

root@debian:/# usermod -aG cdrom,floppy,audio,dip,video,plugdev,netdev yourusername

root@debian:/# usermod -s /bin/bash yourusername

root@debian:/# apt install sudo

root@debian:/# usermod -aG sudo yourusername

root@debian:/# cat /etc/sudoers

root@debian:/# mkdir /etc/inittab.d

root@debian:/# apt install firmware-linux

root@debian:/# apt install lightdm

root@debian:/# apt install mate-desktop-environment

root@debian:/# apt install mate-desktop-environment-extras

root@debian:/# apt install grub-efi-amd64

root@debian:/# grub-install --target=x86_64-efi --efi-directory=/boot/efi

root@debian:/# update-grub

root@debian:/# apt clean

root@debian:/# exit

root@debian:~# rm /mnt/etc/resolv.conf

root@debian:~# umount /dev/sda1

root@debian:~# umount /dev/sda4

root@debian:~# umount /dev/sda3

root@debian:~# reboot


###########################################################################################################
#####After rebooting, if you do not see the Plymouth page during boot and shutdown, follow these steps#####
#####to resolve the issue:#################################################################################
#####add the splash option to the file  /etc/default/grub  , as follows: ##################################

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

##### then ##############################

root@debian:~# update-grub

root@debian:~# reboot

########################################################################################################################
########################################################################################################################


#################################################################################################################


Install+Debian 13+Debootstrap+OpenRC+MATE Desktop+the Arch way    :

#######################Install+Debian 13+Debootstrap+OpenRC+MATE Desktop+the Arch way######################
###########################################################################################################
##### This is how my system partitioning is, you can change them according to your system partitioning.####
##### /dev/sda1 for efi, /dev/sda2 for swap, /dev/sda3 for root, /dev/sda4 for home #######################
##### You must use the Debian live distribution.###########################################################
###########################################################################################################
##### Before you run these commands, you should first partition your hard drive, for example with gparted.#
##### The mkfs commands used here are only for formatting the desired partition, not for creating it.######
##### For example, we formatted the partition with mkfs to ext4 or fat 32.#################################
###########################################################################################################
##### In the following commands, replace yourhostname with your desired host name and yourusername ########
##### with your desired username.##########################################################################
###########################################################################################################
##### On the command line, be sure to note the difference between user@debian:~$ and ######################
##### root@debian:~# and root@debian:/#, which represent completely different paths.#######################
##### #####################################################################################################
##### you need to decide if you want sudo or doas in order to elevate your user’s privileges for###########
##### updates, etc… This is your choice.Debian provides a pre-configured sudoers file, and you ############
##### probably don’t need to change anything, but it’s wise to verify that the line #######################
##### under “allow members of group sudo …” is not commented out with the cat /etc/sudoers command.########
##### Look at the output, and if the line is commented out, use the visudo command and uncomment it.#######
###########################################################################################################
#####I am installing the Mate desktop here, but you can install another desktop according to your taste.###
###########################################################################################################
#####I am installing the lightdm display manager here, but you can install another display manager#########
#####according to your taste.##############################################################################
###########################################################################################################



user@debian:~$ sudo apt install tmux

user@debian:~$ tmux

user@debian:~$ sudo su -
root@debian:~#

root@debian:~# apt update && apt install debootstrap arch-install-scripts -y

root@debian:~# mkfs.fat -F 32 /dev/sda1

root@debian:~# mkswap /dev/sda2

root@debian:~# swapon /dev/sda2

root@debian:~# mkfs.ext4 /dev/sda3

root@debian:~# mkfs.ext4 /dev/sda4

root@debian:~# mount /dev/sda3 /mnt

root@debian:~# mkdir -p /mnt/{boot,home}

root@debian:~# mount /dev/sda4 /mnt/home

root@debian:~# mkdir -p /mnt/boot/efi

root@debian:~# mount /dev/sda1 /mnt/boot/efi

root@debian:~# mount | grep sda

root@debian:~# ls  /usr/share/debootstrap/scripts/

root@debian:~# /usr/sbin/debootstrap  --variant=minbase --include=vim  trixie  /mnt  http://deb.debian.org/debian/

root@debian:~# genfstab -U /mnt >> /mnt/etc/fstab

root@debian:~# echo deb http://deb.debian.org/debian trixie main contrib non-free-firmware non-free > /mnt/etc/apt/sources.list

root@debian:~# echo deb http://deb.debian.org/debian-security trixie-security main contrib non-free-firmware non-free >> /mnt/etc/apt/sources.list

root@debian:~# echo deb http://deb.debian.org/debian/ trixie-updates main contrib non-free-firmware non-free >> /mnt/etc/apt/sources.list
 
root@debian:~# arch-chroot /mnt
root@debian:/#

root@debian:/# apt update

root@debian:/# apt install openrc sysvinit-core  orphan-sysvinit-scripts elogind libpam-elogind

root@debian:/# apt-mark hold systemd systemd-sysv  libpam-systemd

root@norouzi:~# cat > /etc/apt/preferences.d/nosystemd << "EOF"
> Package: systemd
> Pin: release *
> Pin-Priority: -1
>
> Package: systemd-sysv
> Pin: release *
> Pin-Priority: -1
>
> Package: libpam-systemd
> Pin: release *
> Pin-Priority: -1
> EOF
root@debian:/#

root@norouzi:~# apt-mark showhold

root@debian:/# apt install linux-image-amd64

root@debian:/# dpkg-reconfigure tzdata

root@debian:/# apt install network-manager

root@debian:/# echo "yourhostname" > /etc/hostname

root@debian:/# echo "127.0.0.1       localhost" > /etc/hosts
root@debian:/# echo "127.0.1.1       yourhostname" >> /etc/hosts     
root@debian:/# echo "::1             localhost ip6-localhost ip6-loopback" >> /etc/hosts
root@debian:/# echo "fe00::0         ip6-localnet" >> /etc/hosts
root@debian:/# echo "ff00::0         ip6-mcastprefix" >> /etc/hosts
root@debian:/# echo "ff02::1         ip6-allnodes"  >>  /etc/hosts
root@debian:/# echo "ff02::2         ip6-allrouters" >> /etc/hosts

root@debian:/# apt install locales

root@debian:/# dpkg-reconfigure locales

root@debian:/# apt install console-setup

root@debian:/# dpkg-reconfigure keyboard-configuration

root@debian:/# passwd

root@debian:/# useradd -m yourusername

root@debian:/# passwd yourusername

root@debian:/# usermod -aG cdrom,floppy,audio,dip,video,plugdev,netdev yourusername

root@debian:/# usermod -s /bin/bash yourusername

root@debian:/# apt install sudo

root@debian:/# usermod -aG sudo yourusername

root@debian:/# cat /etc/sudoers

root@debian:/# mkdir /etc/inittab.d

root@debian:/# apt install firmware-linux

root@debian:/# apt install lightdm

root@debian:/# apt install mate-desktop-environment

root@debian:/# apt install mate-desktop-environment-extras

root@debian:/# apt install grub-efi-amd64

root@debian:/# grub-install --target=x86_64-efi --efi-directory=/boot/efi

root@debian:/# update-grub

root@debian:/# apt clean

root@debian:/# exit

root@debian:~# rm /mnt/etc/resolv.conf

root@debian:~# umount /dev/sda1

root@debian:~# umount /dev/sda4

root@debian:~# umount /dev/sda3

root@debian:~# reboot


###########################################################################################################
##### After rebooting, if you see the error "ERROR: plymouth failed to start. " in the boot log.###########
##### Method 1: Remove the plymouth package ###############################################################
###########################################################################################################
##### Method 2:############################################################################################
##### In the second method, you will not remove the plymouth package, but you will make further############
#####adjustments until the plymouth-related error is resolved.#############################################

root@debian:~# sudo update-rc.d -f plymouth remove
root@debian:~# sudo update-rc.d -f plymouth-log remove

######And add the splash option to the file  /etc/default/grub  , as follows: #############################

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

##### then ##############################

root@debian:~# update-grub

root@debian:~# reboot

########################################################################################################################
########################################################################################################################


#################################################################################################################


Install+Debian 13+Debootstrap+Runit+MATE Desktop+the Arch way   :


#######################Install+Debian 13+Debootstrap+Runit+MATE Desktop+the Arch way#######################
###########################################################################################################
##### This is how my system partitioning is, you can change them according to your system partitioning.####
##### /dev/sda1 for efi, /dev/sda2 for swap, /dev/sda3 for root, /dev/sda4 for home #######################
##### You must use the Debian live distribution.###########################################################
###########################################################################################################
##### Before you run these commands, you should first partition your hard drive, for example with gparted.#
##### The mkfs commands used here are only for formatting the desired partition, not for creating it.######
##### For example, we formatted the partition with mkfs to ext4 or fat 32.#################################
###########################################################################################################
##### In the following commands, replace yourhostname with your desired host name and yourusername ########
##### with your desired username.##########################################################################
###########################################################################################################
##### On the command line, be sure to note the difference between user@debian:~$ and ######################
##### root@debian:~# and root@debian:/#, which represent completely different paths.#######################
##### #####################################################################################################
##### you need to decide if you want sudo or doas in order to elevate your user’s privileges for###########
##### updates, etc… This is your choice.Debian provides a pre-configured sudoers file, and you ############
##### probably don’t need to change anything, but it’s wise to verify that the line #######################
##### under “allow members of group sudo …” is not commented out with the cat /etc/sudoers command.########
##### Look at the output, and if the line is commented out, use the visudo command and uncomment it.#######
###########################################################################################################
#####I am installing the Mate desktop here, but you can install another desktop according to your taste.###
###########################################################################################################
#####I am installing the xdm display manager here, but you can install another display manager#############
#####according to your taste.##############################################################################
###########################################################################################################



user@debian:~$ sudo apt install tmux

user@debian:~$ tmux

user@debian:~$ sudo su -
root@debian:~#

root@debian:~# apt update && apt install debootstrap arch-install-scripts -y

root@debian:~# mkfs.fat -F 32 /dev/sda1

root@debian:~# mkswap /dev/sda2

root@debian:~# swapon /dev/sda2

root@debian:~# mkfs.ext4 /dev/sda3

root@debian:~# mkfs.ext4 /dev/sda4

root@debian:~# mount /dev/sda3 /mnt

root@debian:~# mkdir -p /mnt/{boot,home}

root@debian:~# mount /dev/sda4 /mnt/home

root@debian:~# mkdir -p /mnt/boot/efi

root@debian:~# mount /dev/sda1 /mnt/boot/efi

root@debian:~# mount | grep sda

root@debian:~# ls  /usr/share/debootstrap/scripts/

root@debian:~# /usr/sbin/debootstrap  --variant=minbase --include=vim  trixie  /mnt  http://deb.debian.org/debian/

root@debian:~# genfstab -U /mnt >> /mnt/etc/fstab

root@debian:~# echo deb http://deb.debian.org/debian trixie main contrib non-free-firmware non-free > /mnt/etc/apt/sources.list

root@debian:~# echo deb http://deb.debian.org/debian-security trixie-security main contrib non-free-firmware non-free >> /mnt/etc/apt/sources.list

root@debian:~# echo deb http://deb.debian.org/debian/ trixie-updates main contrib non-free-firmware non-free >> /mnt/etc/apt/sources.list
 
root@debian:~# arch-chroot /mnt
root@debian:/#

root@debian:/# apt update

root@debian:/# apt install runit-init runit-services orphan-sysvinit-scripts elogind libpam-elogind

root@debian:/# apt-mark hold systemd systemd-sysv  libpam-systemd

root@norouzi:~# cat > /etc/apt/preferences.d/nosystemd << "EOF"
> Package: systemd
> Pin: release *
> Pin-Priority: -1
>
> Package: systemd-sysv
> Pin: release *
> Pin-Priority: -1
>
> Package: libpam-systemd
> Pin: release *
> Pin-Priority: -1
> EOF
root@debian:/#

root@norouzi:~# apt-mark showhold

root@debian:/# apt install linux-image-amd64

root@debian:/# dpkg-reconfigure tzdata

root@debian:/# apt install network-manager

root@debian:/# echo "yourhostname" > /etc/hostname

root@debian:/# echo "127.0.0.1       localhost" > /etc/hosts
root@debian:/# echo "127.0.1.1       yourhostname" >> /etc/hosts     
root@debian:/# echo "::1             localhost ip6-localhost ip6-loopback" >> /etc/hosts
root@debian:/# echo "fe00::0         ip6-localnet" >> /etc/hosts
root@debian:/# echo "ff00::0         ip6-mcastprefix" >> /etc/hosts
root@debian:/# echo "ff02::1         ip6-allnodes"  >>  /etc/hosts
root@debian:/# echo "ff02::2         ip6-allrouters" >> /etc/hosts

root@debian:/# apt install locales

root@debian:/# dpkg-reconfigure locales

root@debian:/# apt install console-setup

root@debian:/# dpkg-reconfigure keyboard-configuration

root@debian:/# passwd

root@debian:/# useradd -m yourusername

root@debian:/# passwd yourusername

root@debian:/# usermod -aG cdrom,floppy,audio,dip,video,plugdev,netdev yourusername

root@debian:/# usermod -s /bin/bash yourusername

root@debian:/# apt install sudo

root@debian:/# usermod -aG sudo yourusername

root@debian:/# cat /etc/sudoers

root@debian:/# apt install firmware-linux

root@debian:/# apt install xdm

root@debian:/# apt install xserver-xorg

root@debian:/# apt install mate-desktop-environment

root@debian:/# apt install mate-desktop-environment-extras

root@debian:/# apt install grub-efi-amd64

root@debian:/# grub-install --target=x86_64-efi --efi-directory=/boot/efi

root@debian:/# update-grub

root@debian:/# apt clean

root@debian:/# exit

root@debian:~# rm /mnt/etc/resolv.conf

root@debian:~# umount /dev/sda1

root@debian:~# umount /dev/sda4

root@debian:~# umount -l /dev/sda3

root@debian:~# reboot


###########################################################################################################
#####After rebooting, if you do not see the Plymouth page during boot and shutdown, follow these steps#####
#####to resolve the issue:#################################################################################
#####add the splash option to the file  /etc/default/grub  , as follows: ##################################

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

##### then ##############################

root@debian:~# update-grub

root@debian:~# reboot

########################################################################################################################
########################################################################################################################



پایان

آنلاین esmaeelE

  • ناظر انجمن
  • *
  • ارسال: 1417
  • جنسیت : پسر
پاسخ : نصب Debian Debootstrap (حل شد)
« پاسخ #127 : امروز ساعت 09:12 ق‌ظ »
خیلی موضوع خوب و جالبی شد سپاس از پیگیری و مشارکت شما.

اگه بتونید خروجی را در قالب مارک‌داون یا ویکی دربیارید بسیار مفید‌تر و خواناتر خواهد شد.