The PC already has two internal disks containing windows 7 and folders, and I wished to install Salix on an exterior disk.
So I connected an exterior 1 TB disk with an USB adaptor and started the computer with the DVD inside.
This stated up the Salix installation. I describe here only the main options I configured, which I suspect something may be wrong; the other options seem to be unimportant for the problem.
I configured the exterior disk ("sdc") as:
sdc1: 30 GB, linux partition, bootable, write the partition table to the disk;
sdc2: 12 GB, linux swap partition, write the partition table to the disk;
sdc3: rest of the disk, linux partition, write the partition table to the disk.
Then they asked me about format: I configured
sdc1: / , ext4
sdc2: /swap
sdc3: /home, ext4
This is a really interesting system.
What to do:
1. Boot with SalixLive64 Xfce 15.0 dvd.
Your first disk is /dev/sda, Your second disk is /dev/sdb
2. While on live environment plug in the usb where external disk is connected to install salix.
This external disk will be /dev/sdc.
Steps:
1. click on gparted. Create a gpt partition table. (click on Partition->New-> gpt)
2. create a vfat32 300MB partition for UEFI (/dev/sdc1.) After creation sign it esp,boot. (right click with the mouse on it and click on Manage flags. Click on boot) You will see boot,esp on flags column..
3. create a linux swap partition (/dev/sdc2)
4. create a linux ext4 partition (/dev/sdc3)
close gparted.
5. choose /dev/sdc3 as install location:
6. Grub is already checked. Do not change it.
7. Filesystem is already set to ext4. Do not change it.
8. click on system clock and set time zone
9. click on Language and set Language
10. click on keyboard and set keyboard
11. type the user name
12. type the user password twice.
13. click on install live system.
wait until installation finish.
After installation finish do not close the computer.
1. Download and save the attachment script with the name
install-portable-n to /home/one folder.
Code: Select all
#!/bin/sh
# We will install GRUB in the parent device of the root partition, so
# that the system stays bootable if moved, at least if the firmware of
# the machine where this devices lands is set to boot from it first.
# This script is from Slint and is modified for salix.
export TEXTDOMAIN=salix
. gettext.sh
if [ ! $(id -u) -eq 0 ]; then
gettext "Only root may run this script."
exit
fi
if [ "$(df|grep /mnt$)" = "" ]; then
echo "The root partition (/) of the newly installed system should be"
echo "mounted as /mnt before running this script."
exit
fi
export ROOTDELAY=5
TMP=$(mktemp)
dialog \
--title "$(gettext "INCLUDE EXTRA PARAMETERS IN THE BOOT COMMAND LINE?")" \
--inputbox \
"$(gettext "You might need extra parameters to be included in the boot command \
line of the installed system. If you typed parameters before booting \
the Slint installer, you will probably want to enter the same ones here. \
If you don't need any extra parameter to be included, just press ENTER \
to continue.
")" 12 72 2> $TMP
export KERNELPARAMS=$(<$TMP)
rm $TMP
USB_HOST_AND_STORAGE="mmc \
mmc_block \
mmc_core \
pcmcia \
pcmcia_core \
ssb \
ehci-hcd \
ehci-pci \
ehci-platform \
fotg210-hcd \
isp116x-hcd \
isp1362-hcd \
ohci-hcd \
ohci-pci \
ohci-platform \
oxu210hp-hcd \
r8a66597-hcd \
sl811-hcd \
sl811_cs \
ssb-hcd \
uhci-hcd \
whci-hcd \
xhci-hcd \
xhci-pci \
xhci-plat-hcd \
uas \
ums-freecom \
usb-storage \
wusbcore \
umc \
uwb \
whci"
#EFI="efi-pstore \
#efivars"
USB_KBD="uhci-hcd \
usbhid \
hid-huge"
btrfs="btrfs"
ext2="mbcache \
ext2"
ext3="jbd2 \
mbcache \
crc32c-intel \
ext4"
ext4="jbd2 \
mbcache \
crc32c-intel \
ext4"
# f2fs="f2fs"
jfs="jfs"
reiserfs="reiserfs"
xfs="xfs"
MODULES="$USB_HOST_AND_STORAGE $USB_KBD"
ROOTPART=$(lsblk -l -o name,mountpoint| grep /mnt$|sed "s,\([^[:space:]]*\).*,/dev/\1,")
ROOTNAME=$(echo $ROOTPART|sed "s,/dev/,,")
ROOTUUID=$(lsblk -l -o name,uuid|grep ^$ROOTNAME|sed "s/[^ ]*[[:space:]]*//")
FSTYPE=$(lsblk -l -o name,fstype|grep ^$ROOTNAME|sed "s/[^ ]*[[:space:]]*//")
ROOTDEVICE=/dev/$(lsblk -l -o name,pkname|grep ^$ROOTNAME|sed "s/[^ ]*[[:space:]]*//")
BRAND=$(grep ^NAME /mnt/etc/os-release|sed "s/.*=//")
KERNELVERSION=$(ls -1tr /mnt/boot/vmlinuz-huge-*|sed -n '/$/s,.*-,,p')
EFIINSTALL=n
check_efi() {
# We will install grub for UEFI booting if and only if an ESP on the
# same drive as the root partition is mounted on /mnt/boot/efi
# If no partition is mounted as /boot/efi, bail out.
PARTNAME=$(lsblk -l -o name,mountpoint |grep /mnt/boot/efi|sed "s/[[:space:]]\{1,\}.*//")
if [ "$PARTNAME" = "" ]; then
return
fi
# If the partition mounted as /boot/efi is not an ESP, bail out.
# The UEFI specification states that an ESP has a GUID of
# C12A7328-F81F-11D2-BA4B-00A0C93EC93B in case of a GPT layout.
# In case of a DOS layout instead, an ESP should have an OS type of
# 0xEF. lsblk writes these values in the same field PARTTYPE.
ESPPARTTYPE=C12A7328-F81F-11D2-BA4B-00A0C93EC93B
OSTYPE=0xEF
PARTTYPE=$(lsblk -l -o parttype,name|grep $PARTNAME|sed "s/[[:space:]]\{1,\}.*//")
if [ "$(echo $PARTTYPE|grep -i $ESPPARTTYPE)" = "" ] && \
[ "$(echo $PARTTYPE|grep -i $OSTYPE)" = "" ]; then
return
fi
# If the file system of the partition mounted as /efi/boot is not
# VFAT, bail out.
PARTFSTYPE=$(lsblk -l -o fstype,name|grep $PARTNAME|sed "s/[[:space:]]\{1,\}.*//")
if [ "(echo $PARTFSTYPE| grep -i vfat)" = "" ]; then
return
fi
# The ESP mounted as /mnt/boot/efi should be on the same device as
# the target root partition.
ESPDEVICE=/dev/$(lsblk -l -o pkname,name|grep ${PARTNAME}$|sed "s/[[:space:]]\{1,\}.*//")
if [ ! "$ESPDEVICE" = "$ROOTDEVICE" ]; then
return
fi
EFIINSTALL=y
}
#check_efi
case $FSTYPE in
btrfs) FS=$btrfs;;
ext2) FS=$ext2;;
ext3) FS=$ext3;;
ext4) FS=$ext4;;
jfs) FS=$jfs;;
reiserfs) FS=$reiserfs;;
xfs) FS=$xfs;;
*) echo "Root file system $FSTYPE is not supported."
exit
esac
export MODULES=$(printf "$MODULES $FS"|sed "s/ /:/g")
lsblk -l -o uuid,type,name|grep part| \
sed "s, *\([^ ]*\) *[^ ]* *\([^ ]*\).*,s;/dev/\2;UUID=\1;," > /mnt/tmp/part_list
cat << EOF > /mnt/etc/salix-version
salix 15.0
EOF
export SALIXVERSION=$(</mnt/etc/salix-version)
cat << EOF > /mnt/boot/grub/grub.cfg
# This grub.cfg is part of a portable Slint.
# Do NOT remove or modify the line above, as it indicates to the script
# update-kernel that it should install a new initrd but run the script
# update-portable instead of update-grub after a kernel upgrade.
set menu_color_normal=white/black
set menu_color_highlight=white/blue
terminal_output console
set timeout=10
play 480 262 1 330 1 392 1 523 1
menuentry 'Boot $SALIXVERSION kernel $KERNELVERSION' {
echo "Starting $SALIXVERSION kernel $KERNELVERSION. Please wait..."
insmod part_gpt
insmod part_msdos
insmod btrfs
insmod f2fs
insmod ext2
insmod jfs
insmod reiserfs
insmod xfs
insmod all_video
search --fs-uuid --set=root $ROOTUUID
linux /boot/vmlinuz-huge-$KERNELVERSION root=UUID=$ROOTUUID vga=normal ro $KERNELPARAMS
initrd /boot/initrd.gz
}
EOF
cat << EOF > /mnt/bin/post_install
#!/bin/sh
if [ ! -f /etc/fstab ]; then
gettext "I can't find /etc/fstab in the newly installed system.
Please complete its installation before running this script."
echo
exit
fi
echo "creating initrd.gz"
mkinitrd -c -k $KERNELVERSION -f $FSTYPE -r UUID=$ROOTUUID -m $MODULES -w $ROOTDELAY -u -o /boot/initrd.gz 1>/dev/null 2>/dev/null
if [ ! -f /etc/fstab.orig ]; then
cp /etc/fstab /etc/fstab.orig
fi
sed -f /tmp/part_list /etc/fstab > dummy
mv dummy /etc/fstab
# Let's replace the huge kernel by a huge one.
# Remove the huge kernel, the huge one should already be there.
#if [ -f /boot/vmlinuz-huge-* ]; then
# removepkg kernel-huge
# ( cd /boot
# rm -f System.map config config-huge vmlinuz vmlinuz-huge
# )
#fi
EOF
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /dev /mnt/dev
chmod 755 /mnt/bin/post_install
chroot /mnt /bin/post_install
# We install in both Legacy and EFI modes if possible.
#echo ROOTDEVICE=$ROOTDEVICE
#chroot /mnt grub-install --target=i386-pc $ROOTDEVICE
#if [ "$EFIINSTALL" = "y" ]; then
# chroot /mnt grub-install --target=x86_64-efi --no-nvram --removable $ROOTDEVICE
#fi
#rm /mnt/bin/post_install /mnt/tmp/part_list
umount /mnt/proc
umount /mnt/sys
umount /mnt/dev
Open a terminal and type df -H to check that /dev/sdc1 and /dev/sdc3 are not mounted.
2. mount the /dev/sdc3 partition where system installed to /mnt
It is important to mount the external disk in /mnt otherwise script will not work
3. now type
Code: Select all
sudo sh /home/one/install-portable-n
and type the password it is one
initrd.gz will be created to /mnt/boot/ and also a grub.cfg file in /mnt/boot/grub/
to check type sudo ls -l /mnt//boot/
You will see initrd.gz there check the date and time to see it is newly created.
Type sudo cat /mnt/boot/grub/grub.cfg
You will see the grub.cfg file.
umount the disk typing
Shutdown the system
Unplug the usb external disk and plug in the usb external disk again.
Turn on pc and immediatelly Press fn+F12 or whatever is the F key to your system to go to bios boot menu. You see there the USB disk. Boot from it.
A user of slackel had a problem like this and this method worked. He did the installation using a live-usb to boot and install to external ssd disk using btrfs filesystem.
Please report if it worked.