Kaydet (Commit) e23be5ba authored tarafından Ali Rıza KESKİN's avatar Ali Rıza KESKİN

debug modu kernelden değil oluştururken ayarlıyoruz. (kernel debug olarak…

debug modu kernelden değil oluştururken ayarlıyoruz. (kernel debug olarak başlatmak sıkıntı olabilir.)

live modundaki buglar giderildi.

live modda zorla root ayarlama eklendi.
çeviri hataları giderildi.
üst 8d851a72
...@@ -51,3 +51,5 @@ No root device specified.:: ...@@ -51,3 +51,5 @@ No root device specified.::
Where is the root:: Where is the root::
Setting root:: Setting root::
is not a block device:: is not a block device::
Checking init::
Force setting root::
...@@ -45,7 +45,7 @@ Switching root::Kok degistiriliyor ...@@ -45,7 +45,7 @@ Switching root::Kok degistiriliyor
Creating initrd::Initrd olusturuluyor Creating initrd::Initrd olusturuluyor
Mount handler running::Baglama islemleri calisiyor Mount handler running::Baglama islemleri calisiyor
UEFI mode detected::UEFI modu tespit edildi UEFI mode detected::UEFI modu tespit edildi
Booting dead. Now you are in initial ramdisk.::Acilis nallari dikti. Simdi baslangıc ramdiski icindesin. Booting dead. Now you are in initial ramdisk.::Acilis nallari dikti. Simdi baslangic ramdiski icindesin.
Detecting real root::Gercek kok tespit ediliyor Detecting real root::Gercek kok tespit ediliyor
No root device specified.::Hicbir kok belirlenmedi. No root device specified.::Hicbir kok belirlenmedi.
Where is the root::Kok nerde amk Where is the root::Kok nerde amk
...@@ -53,4 +53,5 @@ Setting root::Kok ayarlaniyor ...@@ -53,4 +53,5 @@ Setting root::Kok ayarlaniyor
is not a block device::bir blok algit değil is not a block device::bir blok algit değil
Overlayfs disabled::Overlayfs kapali Overlayfs disabled::Overlayfs kapali
Please wait. Reading rootfs...::Lütfen bekleyin. Rootfs okunuyor... Please wait. Reading rootfs...::Lütfen bekleyin. Rootfs okunuyor...
Checking init::Init kontrol ediliyor
Force setting root::Kok zorla ayarlaniyor
...@@ -5,4 +5,6 @@ if [ -f $CONFIG ] ; then ...@@ -5,4 +5,6 @@ if [ -f $CONFIG ] ; then
cat ${CONFIG} > ${WORKDIR}/etc/initrd.conf cat ${CONFIG} > ${WORKDIR}/etc/initrd.conf
else else
echo "LANG=$LANG" > ${WORKDIR}/etc/initrd.conf echo "LANG=$LANG" > ${WORKDIR}/etc/initrd.conf
echo "debug=$debug" >> ${WORKDIR}/etc/initrd.conf
echo "nocolor=$nocolor" >> ${WORKDIR}/etc/initrd.conf
fi fi
...@@ -22,7 +22,7 @@ inf() { ...@@ -22,7 +22,7 @@ inf() {
} }
debug() { debug() {
message=$(translate $1) message=$(translate $1)
[ ! -n "$debug" ] || echo -e " ${C_BLUE}*${C_CLEAR} $message $2" [ "$debug" != "true" ] || echo -e " ${C_BLUE}*${C_CLEAR} $message $2"
} }
warn() { warn() {
message=$(translate $1) message=$(translate $1)
......
...@@ -94,3 +94,4 @@ detect_root(){ ...@@ -94,3 +94,4 @@ detect_root(){
export rootfstype export rootfstype
export init export init
} }
...@@ -9,3 +9,4 @@ parse_cmdline ...@@ -9,3 +9,4 @@ parse_cmdline
detect_root detect_root
run_modules run_modules
fallback_shell fallback_shell
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
common_boot(){ common_boot(){
debug "Moving mountpoints" debug "Moving mountpoints"
mount --move /sys /rootfs/sys for i in sys proc dev tmp run
mount --move /proc /rootfs/proc do
mount --move /dev /rootfs/dev mkdir /rootfs/$i || true 2>/dev/null
mount --move /tmp /rootfs/tmp mount --move /$i /rootfs/$i
mount --move /run /rootfs/run done
} }
overlay_mount(){ overlay_mount(){
mkdir -p /root/a # upper mkdir -p /root/a # upper
...@@ -37,17 +37,23 @@ overlay_mount(){ ...@@ -37,17 +37,23 @@ overlay_mount(){
} }
live_boot(){ live_boot(){
[ "$sfs" == "" ] && sfs="/main.sfs" [ "$sfs" == "" ] && sfs="/main.sfs"
list=$(ls /sys/class/block/ | grep ".*[0-9]$" | grep -v loop | grep -v ram | grep -v nbd | sed "s|^|/dev/|g") if [ "$root" == "" ] ; then
for part in $list list=$(ls /sys/class/block/ | grep ".*[0-9]$" | grep -v loop | grep -v ram | grep -v nbd | sed "s|^|/dev/|g")
do for part in $list
debug "Looking for" "$part" do
if is_file_avaiable "$part" "${sfs}" debug "Looking for" "$part"
then if is_file_avaiable "$part" "${sfs}"
debug "Detected live media" "$part" then
export root=$part debug "Detected live media" "$part"
fi export root=$part
fi
done done
else
msg "Force setting root" "$root"
fi
debug "Mounting live media" debug "Mounting live media"
mkdir /output
mkdir /source
mount -t auto $root /output mount -t auto $root /output
mount /output/${sfs} /source mount /output/${sfs} /source
overlay_mount overlay_mount
...@@ -92,15 +98,15 @@ classic_boot(){ ...@@ -92,15 +98,15 @@ classic_boot(){
} }
if [ "$boot" == "live" ]; then if [ "$boot" == "live" ]; then
msg "Booting from live-media" "($root)"
live_boot || fallback_shell live_boot || fallback_shell
msg "Booting from live-media" "($root)"
elif [ "$boot" == "normal" ]; then elif [ "$boot" == "normal" ]; then
msg "Booting from" "$root"
normal_boot || fallback_shell normal_boot || fallback_shell
msg "Booting from" "$root"
elif [ "$boot" == "freeze" ]; then elif [ "$boot" == "freeze" ]; then
msg "Booting from" "$root (freeze)"
freeze_boot || fallback_shell freeze_boot || fallback_shell
msg "Booting from" "$root (freeze)"
else else
msg "Booting from" "$root (classic)"
classic_boot || fallback_shell classic_boot || fallback_shell
msg "Booting from" "$root (classic)"
fi fi
...@@ -14,6 +14,8 @@ if [ -f /rootfs/$subdir/etc/initrd.local ]; then ...@@ -14,6 +14,8 @@ if [ -f /rootfs/$subdir/etc/initrd.local ]; then
inf "Running local initrd scripts" inf "Running local initrd scripts"
. /rootfs/$subdir/etc/initrd.local || true . /rootfs/$subdir/etc/initrd.local || true
fi fi
msg "Checking init"
[ -f "/rootfs/$subdir/$init" ] || fallback_shell
debug "Switching root" debug "Switching root"
exec env -i \ exec env -i \
"TERM=$TERM" \ "TERM=$TERM" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment