Skip to content

Commit d607532

Browse files
committed
Change url and fix some command for new ubuntu version
Signed-off-by: zactr <[email protected]>
1 parent eb40243 commit d607532

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ubuntu.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ time1="$( date +"%r" )"
44

55
install1 () {
66
directory=ubuntu-fs
7-
UBUNTU_VERSION=22.04
7+
UBUNTU_VERSION=jammy
88
if [ -d "$directory" ];then
99
first=1
1010
printf "\x1b[38;5;214m[${time1}]\e[0m \x1b[38;5;227m[WARNING]:\e[0m \x1b[38;5;87m Skipping the download and the extraction\n"
@@ -35,7 +35,7 @@ exit 1
3535

3636
esac
3737

38-
wget http://cdimage.ubuntu.com/ubuntu-base/releases/${UBUNTU_VERSION}/release/ubuntu-base-${UBUNTU_VERSION}-base-${ARCHITECTURE}.tar.gz -q -O ubuntu.tar.gz
38+
wget https://partner-images.canonical.com/core/${UBUNTU_VERSION}/current/ubuntu-${UBUNTU_VERSION}-core-cloudimg-${ARCHITECTURE}-root.tar.gz -q -O ubuntu.tar.gz
3939
printf "\x1b[38;5;214m[${time1}]\e[0m \x1b[38;5;83m[Installer thread/INFO]:\e[0m \x1b[38;5;87m Download complete!\n"
4040

4141
fi
@@ -44,7 +44,7 @@ cur=`pwd`
4444
mkdir -p $directory
4545
cd $directory
4646
printf "\x1b[38;5;214m[${time1}]\e[0m \x1b[38;5;83m[Installer thread/INFO]:\e[0m \x1b[38;5;87m Decompressing the ubuntu rootfs, please wait...\n"
47-
tar -zxf $cur/ubuntu.tar.gz --exclude='dev'||:
47+
proot --link2symlink tar -zxf $cur/ubuntu.tar.gz --exclude='dev'||:
4848
printf "\x1b[38;5;214m[${time1}]\e[0m \x1b[38;5;83m[Installer thread/INFO]:\e[0m \x1b[38;5;87m The ubuntu rootfs have been successfully decompressed!\n"
4949
printf "\x1b[38;5;214m[${time1}]\e[0m \x1b[38;5;83m[Installer thread/INFO]:\e[0m \x1b[38;5;87m Fixing the resolv.conf, so that you have access to the internet\n"
5050
printf "nameserver 8.8.8.8\nnameserver 8.8.4.4\n" > etc/resolv.conf

0 commit comments

Comments
 (0)